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

Commit 69003ee4 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Ensure ACTION_EMERGENCY_CALL_STATE_CHANGED doesn't send on GSM.

If on a CDMA carrier which supports ECM and roaming on GSM, we should not
be sending the ACTION_EMERGENCY_CALL_STATE_CHANGED intents since we will
not be going into ECM.

Test: Manual
Bug: 117912348
Change-Id: Iac607d1b28d273b77365e2b752f8393af3cc7f16
parent 923d790a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -625,11 +625,16 @@ public class GsmCdmaPhone extends Phone {
        intent.putExtra(PhoneConstants.PHONE_IN_ECM_STATE, isInEcm());
        SubscriptionManager.putPhoneIdAndSubIdExtra(intent, getPhoneId());
        ActivityManager.broadcastStickyIntent(intent, UserHandle.USER_ALL);
        if (DBG) logd("sendEmergencyCallbackModeChange");
        logi("sendEmergencyCallbackModeChange");
    }

    @Override
    public void sendEmergencyCallStateChange(boolean callActive) {
        if (!isPhoneTypeCdma()) {
            // It possible that this method got called from ImsPhoneCallTracker#
            logi("sendEmergencyCallbackModeChange - skip for non-cdma");
            return;
        }
        if (mBroadcastEmergencyCallStateChanges) {
            Intent intent = new Intent(TelephonyIntents.ACTION_EMERGENCY_CALL_STATE_CHANGED);
            intent.putExtra(PhoneConstants.PHONE_IN_EMERGENCY_CALL, callActive);