Don't call onStartRtt unless RTT property changes
Don't call onStartRtt inside the call connection property change unless
the RTT property flipped to on -- this'll send spurious RTT requests if
RTT was already on.
Change-Id: If8ee4e9bf994f1ed6c6fc58c3f224445493f9c5d
Fixes: 110855750
Test: manual
diff --git a/src/com/android/server/telecom/Call.java b/src/com/android/server/telecom/Call.java
index 04f06a2..bc20d1c 100644
--- a/src/com/android/server/telecom/Call.java
+++ b/src/com/android/server/telecom/Call.java
@@ -1453,7 +1453,9 @@
if (changedProperties != 0) {
int previousProperties = mConnectionProperties;
mConnectionProperties = connectionProperties;
- if ((mConnectionProperties & Connection.PROPERTY_IS_RTT) ==
+ boolean didRttChange =
+ (changedProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT;
+ if (didRttChange && (mConnectionProperties & Connection.PROPERTY_IS_RTT) ==
Connection.PROPERTY_IS_RTT) {
createRttStreams();
// Call startRtt to pass the RTT pipes down to the connection service.
@@ -1468,8 +1470,6 @@
}
mWasHighDefAudio = (connectionProperties & Connection.PROPERTY_HIGH_DEF_AUDIO) ==
Connection.PROPERTY_HIGH_DEF_AUDIO;
- boolean didRttChange =
- (changedProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT;
for (Listener l : mListeners) {
l.onConnectionPropertiesChanged(this, didRttChange);
}