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

Commit 782d1005 authored by Amit Mahajan's avatar Amit Mahajan Committed by android-build-merger
Browse files

Remove additional logic around broadcasting emergency call state changes am:...

Remove additional logic around broadcasting emergency call state changes am: 722f9a0f am: 7fc988a5
am: 06a15cd6

Change-Id: I88fc1be60448865b67d03e7d6bfd78b13d46a5b2
parents 28f0887b 06a15cd6
Loading
Loading
Loading
Loading
+5 −20
Original line number Diff line number Diff line
@@ -186,8 +186,6 @@ public class GsmCdmaPhone extends Phone {

    private int mRilVersion;
    private boolean mBroadcastEmergencyCallStateChanges = false;
    // flag to indicate if emergency call end broadcast should be sent
    boolean mSendEmergencyCallEnd = true;

    // Constructors

@@ -640,24 +638,11 @@ public class GsmCdmaPhone extends Phone {
    @Override
    public void sendEmergencyCallStateChange(boolean callActive) {
        if (mBroadcastEmergencyCallStateChanges) {
            if (callActive &&
                    getServiceState().getRilDataRadioTechnology() == ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN) {
                // if emergency call is started while on iwlan, do not send the start or end
                // broadcast
                mSendEmergencyCallEnd = false;
                if (DBG) Rlog.d(LOG_TAG, "sendEmergencyCallStateChange: not sending call start " +
                        "intent as voice tech is IWLAN");
            } else if (callActive || mSendEmergencyCallEnd) {
            Intent intent = new Intent(TelephonyIntents.ACTION_EMERGENCY_CALL_STATE_CHANGED);
            intent.putExtra(PhoneConstants.PHONE_IN_EMERGENCY_CALL, callActive);
            SubscriptionManager.putPhoneIdAndSubIdExtra(intent, getPhoneId());
            ActivityManagerNative.broadcastStickyIntent(intent, null, UserHandle.USER_ALL);
                if (DBG) Rlog.d(LOG_TAG, "sendEmergencyCallStateChange");
            } else {
                if (DBG) Rlog.d(LOG_TAG, "sendEmergencyCallStateChange: not sending call end " +
                        "intent as start was not sent");
                mSendEmergencyCallEnd = true;
            }
            if (DBG) Rlog.d(LOG_TAG, "sendEmergencyCallStateChange: callActive " + callActive);
        }
    }