CROSS_SIM: Use extras to trigger update to properties

- When the call moves from CROSS_SIM to WIFI
  and vice versa, the UI may wish to update the connection
  label to indicate the type of call
- If the extras contain or contained cross sim extra, then
  update status hint and properties, which is used to
  determine which label to show on the UI

Change-Id: I65a8aa1b7f1baa9259228f3b349dfe6f6de8a2ec
Bug: 230005676
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");
                 }