Don't send RTT upgrade request if already RTT
If startRtt is called when the call is already an RTT call, pass down
the pipes instead of sending a new RTT request.
Bug: 80257914
Test: manual
Change-Id: I7e4f4ffea57b11156deb8765449ab2d1ca310b81
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index e80a06e..d6fb3ad 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -838,7 +838,11 @@
public void onStartRtt(RttTextStream textStream) {
if (isImsConnection()) {
ImsPhoneConnection originalConnection = (ImsPhoneConnection) mOriginalConnection;
- originalConnection.sendRttModifyRequest(textStream);
+ if (originalConnection.isRttEnabledForCall()) {
+ originalConnection.setCurrentRttTextStream(textStream);
+ } else {
+ originalConnection.sendRttModifyRequest(textStream);
+ }
} else {
Log.w(this, "onStartRtt - not in IMS, so RTT cannot be enabled.");
}