Merge "CROSS_SIM: Use extras to trigger update to properties" am: c3417c25c3

Original change: https://android-review.googlesource.com/c/platform/packages/services/Telephony/+/2072134

Change-Id: I5f7aab63d8e4570fe0e950258a537dc9d2e52943
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index ed07726..f6d3feb 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -813,6 +813,7 @@
     private RttTextStream mRttTextStream = null;
 
     private boolean mWasImsConnection;
+    private boolean mWasCrossSim;
 
     /**
      * Tracks the multiparty state of the ImsCall so that changes in the bit state can be detected.
@@ -2344,6 +2345,16 @@
                                 ImsCallProfile.EXTRA_CONFERENCE_AVAIL)) {
                         updateConnectionCapabilities();
                     }
+                    // If extras contain or contained Cross Sim information,
+                    // then ensure connection properties are updated and propagated to Telecom.
+                    // Also, update the status hints in the case the call has
+                    // has moved from cross sim call back to wifi
+                    mWasCrossSim |= mOriginalConnectionExtras.containsKey(
+                                ImsCallProfile.EXTRA_IS_CROSS_SIM_CALL);
+                    if (mWasCrossSim) {
+                        updateStatusHints();
+                        updateConnectionProperties();
+                    }
                 } else {
                     Log.d(this, "Extras update not required");
                 }