From dc719d4f10fdfa03f66c4e3f366c6fca26347fbb Mon Sep 17 00:00:00 2001 From: Hall Liu Date: Fri, 9 Feb 2018 16:55:05 -0800 Subject: Rtt bugfixes, part 5 * Answer RTT incoming calls with the proper bit set in ImsStreamMediaProfile Bug: 72762206 Test: manual Change-Id: Ic3c4517a06f57d6c5a2a1d92e5eab9df9929dd64 Merged-In: Ic3c4517a06f57d6c5a2a1d92e5eab9df9929dd64 --- src/java/com/android/ims/ImsCall.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 @@ -604,6 +604,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. * @@ -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; -- cgit v1.2.3