Merge "frameworks/opt/net/ims: Set LOCAL_SDK_VERSION where possible."
diff --git a/src/java/com/android/ims/ImsCall.java b/src/java/com/android/ims/ImsCall.java
index 1d728a1..40d9faa 100644
--- a/src/java/com/android/ims/ImsCall.java
+++ b/src/java/com/android/ims/ImsCall.java
@@ -605,6 +605,12 @@
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 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 void setAnswerWithRtt() {
+ mAnswerWithRtt = true;
+ }
+
private void clear(ImsReasonInfo lastReasonInfo) {
mInCall = false;
mHold = false;