Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f3e3267 authored by Wileen Chiu's avatar Wileen Chiu Committed by Aswin Sankar
Browse files

Check extras to determine if the call is cross sim

- when the call is terminated, instead of displaying
  cellular internet, the UI briefly displays wifi call,
  even though the cross sim extras are present. This occurs
  because the ImsCall object is cleared as part of the clean-up
- If available, check the updated extras instead of querying
  ImsCall to confirm if it is a cross sim call

Bug: 286172450, 230005676
(cherry picked from https://android-review.googlesource.com/q/commit:6e93e9719b611b9df8054c8557adbcba84cffbc7)
Merged-In: I7d52db6c10ef6b478618c9795099f892eb92d547
Change-Id: I7d52db6c10ef6b478618c9795099f892eb92d547
parent 1897d17a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public class ImsPhoneConnection extends Connection implements
    private ImsPhoneCall mParent;
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    private ImsCall mImsCall;
    private Bundle mExtras = new Bundle();
    private final Bundle mExtras = new Bundle();
    private TelephonyMetrics mMetrics = TelephonyMetrics.getInstance();

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@@ -1491,7 +1491,10 @@ public class ImsPhoneConnection extends Connection implements
     * @return boolean: true if cross sim calling, false otherwise
     */
    public boolean isCrossSimCall() {
        return mImsCall != null && mImsCall.isCrossSimCall();
        if (mImsCall == null) {
            return mExtras.getBoolean(ImsCallProfile.EXTRA_IS_CROSS_SIM_CALL);
        }
        return mImsCall.isCrossSimCall();
    }

    /**