summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnju Mathapati <anjucm@codeaurora.org>2017-01-24 11:58:28 -0800
committerAnju Mathapati <anjucm@codeaurora.org>2017-03-07 16:21:05 -0800
commit7e177da50c30b9ae56db29f373ea01ab68bfdcec (patch)
tree83f7cad279c199a7785e2534b753d48bb6117bdf
parent6ac19c0d23a106991e145e4530c7d08d68bfa2d3 (diff)
IMS: RTT interface changes
Changes to implement RTT feature Test: compilation Change-Id: I6ce6993f5ecc321b91642cab297efb35cda3de2b
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java25
-rw-r--r--telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java30
-rw-r--r--telephony/java/com/android/ims/ImsConfig.java8
-rw-r--r--telephony/java/com/android/ims/ImsStreamMediaProfile.java37
-rw-r--r--telephony/java/com/android/ims/internal/IImsCallSession.aidl19
-rw-r--r--telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl20
-rw-r--r--telephony/java/com/android/ims/internal/ImsCallSession.java103
7 files changed, 238 insertions, 4 deletions
diff --git a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
index 69b8acc5b6a9..80b2f789e340 100644
--- a/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsCallSessionImplBase.java
@@ -345,4 +345,29 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
public boolean isMultiparty() throws RemoteException {
return false;
}
+
+ /**
+ * Device issues RTT modify request
+ * @param toProfile The profile with requested changes made
+ */
+ @Override
+ public void sendRttModifyRequest(ImsCallProfile toProfile) {
+ }
+
+ /**
+ * Device responds to Remote RTT modify request
+ * @param status true Accepted the request
+ * false Declined the request
+ */
+ @Override
+ public void sendRttModifyResponse(boolean status) {
+ }
+
+ /**
+ * Device sends RTT message
+ * @param rttMessage RTT message to be sent
+ */
+ @Override
+ public void sendRttMessage(String rttMessage) {
+ }
}
diff --git a/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java b/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java
index 46f8f808a92c..12228a19fcc8 100644
--- a/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsCallSessionListenerImplBase.java
@@ -247,5 +247,35 @@ public class ImsCallSessionListenerImplBase extends IImsCallSessionListener.Stub
ImsSuppServiceNotification suppSrvNotification) {
// no-op
}
+
+ /**
+ * Received RTT modify request from Remote Party
+ * @param session The call session.
+ * @param callProfile ImsCallProfile with updated attribute
+ */
+ @Override
+ public void callSessionRttModifyRequestReceived(IImsCallSession session,
+ ImsCallProfile callProfile) {
+ // no-op
+ }
+
+ /**
+ * Received response for RTT modify request
+ * @param status true : Accepted the request
+ * false : Declined the request
+ */
+ @Override
+ public void callSessionRttModifyResponseReceived(int status) {
+ // no -op
+ }
+
+ /**
+ * Device received RTT message from Remote UE
+ * @param rttMessage RTT message received
+ */
+ @Override
+ public void callSessionRttMessageReceived(String rttMessage) {
+ // no-op
+ }
}
diff --git a/telephony/java/com/android/ims/ImsConfig.java b/telephony/java/com/android/ims/ImsConfig.java
index cd076b1a52df..c3010296d9c0 100644
--- a/telephony/java/com/android/ims/ImsConfig.java
+++ b/telephony/java/com/android/ims/ImsConfig.java
@@ -475,9 +475,15 @@ public class ImsConfig {
*/
public static final int VICE_SETTING_ENABLED = 65;
+ /**
+ * RTT status: Enabled (1), or Disabled (0).
+ * Value is in Integer format.
+ */
+ public static final int RTT_SETTING_ENABLED = 66;
+
// Expand the operator config items as needed here, need to change
// PROVISIONED_CONFIG_END after that.
- public static final int PROVISIONED_CONFIG_END = VICE_SETTING_ENABLED;
+ public static final int PROVISIONED_CONFIG_END = RTT_SETTING_ENABLED;
// Expand the operator config items as needed here.
}
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.java b/telephony/java/com/android/ims/ImsStreamMediaProfile.java
index 216cef59f301..cfe37b524347 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.java
+++ b/telephony/java/com/android/ims/ImsStreamMediaProfile.java
@@ -72,14 +72,20 @@ public class ImsStreamMediaProfile implements Parcelable {
public static final int VIDEO_QUALITY_VGA_LANDSCAPE = (1 << 3);
public static final int VIDEO_QUALITY_VGA_PORTRAIT = (1 << 4);
+ /**
+ * RTT Modes
+ */
+ public static final int RTT_MODE_DISABLED = 0;
+ public static final int RTT_MODE_FULL = 1;
+
// Audio related information
public int mAudioQuality;
public int mAudioDirection;
// Video related information
public int mVideoQuality;
public int mVideoDirection;
-
-
+ // Rtt related information
+ public int mRttMode;
public ImsStreamMediaProfile(Parcel in) {
readFromParcel(in);
@@ -90,6 +96,7 @@ public class ImsStreamMediaProfile implements Parcelable {
mAudioDirection = DIRECTION_SEND_RECEIVE;
mVideoQuality = VIDEO_QUALITY_NONE;
mVideoDirection = DIRECTION_INVALID;
+ mRttMode = RTT_MODE_DISABLED;
}
public ImsStreamMediaProfile(int audioQuality, int audioDirection,
@@ -100,11 +107,16 @@ public class ImsStreamMediaProfile implements Parcelable {
mVideoDirection = videoDirection;
}
+ public ImsStreamMediaProfile(int rttMode) {
+ mRttMode = rttMode;
+ }
+
public void copyFrom(ImsStreamMediaProfile profile) {
mAudioQuality = profile.mAudioQuality;
mAudioDirection = profile.mAudioDirection;
mVideoQuality = profile.mVideoQuality;
mVideoDirection = profile.mVideoDirection;
+ mRttMode = profile.mRttMode;
}
@Override
@@ -112,7 +124,8 @@ public class ImsStreamMediaProfile implements Parcelable {
return "{ audioQuality=" + mAudioQuality +
", audioDirection=" + mAudioDirection +
", videoQuality=" + mVideoQuality +
- ", videoDirection=" + mVideoDirection + " }";
+ ", videoDirection=" + mVideoDirection +
+ ", rttMode=" + mRttMode + " }";
}
@Override
@@ -126,6 +139,7 @@ public class ImsStreamMediaProfile implements Parcelable {
out.writeInt(mAudioDirection);
out.writeInt(mVideoQuality);
out.writeInt(mVideoDirection);
+ out.writeInt(mRttMode);
}
private void readFromParcel(Parcel in) {
@@ -133,6 +147,7 @@ public class ImsStreamMediaProfile implements Parcelable {
mAudioDirection = in.readInt();
mVideoQuality = in.readInt();
mVideoDirection = in.readInt();
+ mRttMode = in.readInt();
}
public static final Creator<ImsStreamMediaProfile> CREATOR =
@@ -147,4 +162,20 @@ public class ImsStreamMediaProfile implements Parcelable {
return new ImsStreamMediaProfile[size];
}
};
+
+ /**
+ * Determines if it's RTT call
+ * @return true if RTT call, false otherwise.
+ */
+ public boolean isRttCall() {
+ return (mRttMode == RTT_MODE_FULL);
+ }
+
+ /**
+ * Updates the RttCall attribute
+ */
+ public void setRttMode(int rttMode) {
+ mRttMode = rttMode;
+ }
+
}
diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
index b1f2d3287dbe..c6fc5e563bf4 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
@@ -255,4 +255,23 @@ interface IImsCallSession {
* @return {@code True} if the session is multiparty.
*/
boolean isMultiparty();
+
+ /**
+ * Device issues RTT modify request
+ * @param toProfile The profile with requested changes made
+ */
+ void sendRttModifyRequest(in ImsCallProfile toProfile);
+
+ /*
+ * Device responds to Remote RTT modify request
+ * @param status true : Accepted the request
+ * false : Declined the request
+ */
+ void sendRttModifyResponse(in boolean status);
+
+ /*
+ * Device sends RTT message
+ * @param rttMessage RTT message to be sent
+ */
+ void sendRttMessage(in String rttMessage);
}
diff --git a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
index d562eccd83fc..ad59c1d84794 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
@@ -130,4 +130,24 @@ interface IImsCallSessionListener {
*/
void callSessionSuppServiceReceived(in IImsCallSession session,
in ImsSuppServiceNotification suppSrvNotification);
+
+ /**
+ * Device received RTT modify request from Remote UE
+ * @param session ImsCallProfile with updated attribute
+ */
+ void callSessionRttModifyRequestReceived(in IImsCallSession session,
+ in ImsCallProfile callProfile);
+
+ /* Device issued RTT modify request and inturn received response
+ * from Remote UE
+ * @param status Will be one of the following values from:
+ * - {@link Connection.RttModifyStatus}
+ */
+ void callSessionRttModifyResponseReceived(in int status);
+
+ /*
+ * While in call, device received RTT message from Remote UE
+ * @param rttMessage Received RTT message
+ */
+ void callSessionRttMessageReceived(in String rttMessage);
}
diff --git a/telephony/java/com/android/ims/internal/ImsCallSession.java b/telephony/java/com/android/ims/internal/ImsCallSession.java
index 8196b2367ce9..f20f7c881958 100644
--- a/telephony/java/com/android/ims/internal/ImsCallSession.java
+++ b/telephony/java/com/android/ims/internal/ImsCallSession.java
@@ -403,6 +403,28 @@ public class ImsCallSession {
public void callSessionSuppServiceReceived(ImsCallSession session,
ImsSuppServiceNotification suppServiceInfo) {
}
+
+ /**
+ * Received RTT modify request from Remote Party
+ */
+ public void callSessionRttModifyRequestReceived(ImsCallSession session,
+ ImsCallProfile callProfile) {
+ // no-op
+ }
+
+ /**
+ * Received response for RTT modify request
+ */
+ public void callSessionRttModifyResponseReceived(int status) {
+ // no -op
+ }
+
+ /**
+ * Device received RTT message from Remote UE
+ */
+ public void callSessionRttMessageReceived(String rttMessage) {
+ // no-op
+ }
}
private final IImsCallSession miSession;
@@ -944,6 +966,57 @@ public class ImsCallSession {
}
/**
+ * Sends Rtt Message
+ *
+ * @param rttMessage rtt text to be sent
+ * @throws ImsException if call is absent
+ */
+ public void sendRttMessage(String rttMessage) {
+ if (mClosed) {
+ return;
+ }
+
+ try {
+ miSession.sendRttMessage(rttMessage);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
+ * Sends RTT Upgrade request
+ *
+ * @param to : expected profile
+ * @throws CallStateException
+ */
+ public void sendRttModifyRequest(ImsCallProfile to) {
+ if (mClosed) {
+ return;
+ }
+
+ try {
+ miSession.sendRttModifyRequest(to);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
+ * Sends RTT Upgrade response
+ *
+ * @param response : response for upgrade
+ * @throws CallStateException
+ */
+ public void sendRttModifyResponse(boolean response) {
+ if (mClosed) {
+ return;
+ }
+
+ try {
+ miSession.sendRttModifyResponse(response);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
* A listener type for receiving notification on IMS call session events.
* When an event is generated for an {@link IImsCallSession},
* the application is notified by having one of the methods called on
@@ -1267,6 +1340,36 @@ public class ImsCallSession {
}
}
+ /**
+ * Received RTT modify request from remote party
+ */
+ @Override
+ public void callSessionRttModifyRequestReceived(IImsCallSession session,
+ ImsCallProfile callProfile) {
+ if (mListener != null) {
+ mListener.callSessionRttModifyRequestReceived(ImsCallSession.this, callProfile);
+ }
+ }
+
+ /**
+ * Received response for RTT modify request
+ */
+ @Override
+ public void callSessionRttModifyResponseReceived(int status) {
+ if (mListener != null) {
+ mListener.callSessionRttModifyResponseReceived(status);
+ }
+ }
+
+ /**
+ * RTT Message received
+ */
+ @Override
+ public void callSessionRttMessageReceived(String rttMessage) {
+ if (mListener != null) {
+ mListener.callSessionRttMessageReceived(rttMessage);
+ }
+ }
}
/**