aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHall Liu <hallliu@google.com>2018-02-22 21:59:09 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-02-22 21:59:09 +0000
commit9f9129866cce570b4d865efe93a2dfd47838cb69 (patch)
tree2e36be175fc897e6948740d29f40002dda233199
parent6e66ce3cf4b7e656f53fcb5518b3b0f5713d73f3 (diff)
parent0ccc55626d633dfac9c6087fd7b94943a221da37 (diff)
downloadims-9f9129866cce570b4d865efe93a2dfd47838cb69.tar.gz
Rtt bugfixes, part 5 am: dc719d4f10
am: 0ccc55626d Change-Id: I97dd05297575a30e4a0bc7f19c62b15df31cdc24
-rw-r--r--src/java/com/android/ims/ImsCall.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/java/com/android/ims/ImsCall.java b/src/java/com/android/ims/ImsCall.java
index 1d728a1a..40d9faa2 100644
--- a/src/java/com/android/ims/ImsCall.java
+++ b/src/java/com/android/ims/ImsCall.java
@@ -605,6 +605,12 @@ public class ImsCall implements ICall {
private int mOverrideReason = ImsReasonInfo.CODE_UNSPECIFIED;
/**
+ * When true, if this call is incoming, it will be answered with an
+ * {@link ImsStreamMediaProfile} that has RTT enabled.
+ */
+ private boolean mAnswerWithRtt = false;
+
+ /**
* Create an IMS call object.
*
* @param context the context for accessing system services
@@ -1135,6 +1141,11 @@ public class ImsCall implements ICall {
public void accept(int callType, ImsStreamMediaProfile profile) throws ImsException {
logi("accept :: callType=" + callType + ", profile=" + profile);
+ if (mAnswerWithRtt) {
+ profile.mRttMode = ImsStreamMediaProfile.RTT_MODE_FULL;
+ logi("accept :: changing media profile RTT mode to full");
+ }
+
synchronized(mLockObj) {
if (mSession == null) {
throw new ImsException("No call to answer",
@@ -1681,6 +1692,10 @@ public class ImsCall implements ICall {
}
}
+ public void setAnswerWithRtt() {
+ mAnswerWithRtt = true;
+ }
+
private void clear(ImsReasonInfo lastReasonInfo) {
mInCall = false;
mHold = false;