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

Commit 17a89329 authored by Sukanya Rajkhowa's avatar Sukanya Rajkhowa Committed by Etan Cohen
Browse files

Trigger phone switch based on config

When VOICE_REGISTRATION_STATE changes, phone switch
may not be needed as a previous switch would have
happened on receiving UNSOL_VOICE_RADIO_TECH_CHANGED.
Do a phone switch only if the config is true.

Bug: 17394282
Change-Id: I4a4aa98bd0af9eaca46b0d09458a126313e97611
parent e433881d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -292,8 +292,11 @@ public abstract class ServiceStateTracker extends Handler {
    }

    protected void updatePhoneObject() {
        if (mPhoneBase.getContext().getResources().
                getBoolean(com.android.internal.R.bool.config_switch_phone_on_voice_reg_state_change)) {
            mPhoneBase.updatePhoneObject(mSS.getRilVoiceRadioTechnology());
        }
    }

    /**
     * Registration point for combined roaming on
+16 −13
Original line number Diff line number Diff line
@@ -670,6 +670,8 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
    @Override
    protected void updatePhoneObject() {
        int voiceRat = mSS.getRilVoiceRadioTechnology();
        if (mPhone.getContext().getResources().
                getBoolean(com.android.internal.R.bool.config_switch_phone_on_voice_reg_state_change)) {
            // For CDMA-LTE phone don't update phone to GSM
            // if replacement RAT is unknown
            // If there is a  real need to switch to LTE, then it will be done via
@@ -685,6 +687,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
            }
            mPhoneBase.updatePhoneObject(voiceRat);
        }
    }

    @Override
    protected void log(String s) {