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

Commit ab558813 authored by Shishir Agrawal's avatar Shishir Agrawal
Browse files

CdmaLteServiceStateTracker: Do not override the volte override.

Doing this could lead to the device being stuck in CDMAPhone incorrectly.

Bug: 18193790
Change-Id: I9e7fe60f19ae1a624b0cbaf3b881e75f4b6ea47a
parent 5c182fdf
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
@@ -667,36 +667,6 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
        }
    }

    @Override
    protected void updatePhoneObject() {
        if (mPhone.getContext().getResources().
                getBoolean(com.android.internal.R.bool.config_switch_phone_on_voice_reg_state_change)) {
            // If the phone is not registered on a network, no need to update.
            boolean isRegistered = mSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE ||
                    mSS.getVoiceRegState() == ServiceState.STATE_EMERGENCY_ONLY;
            if (!isRegistered) {
                Rlog.d(LOG_TAG, "updatePhoneObject: Ignore update");
                return;
            }

            // 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
            // RIL_UNSOL_VOICE_RADIO_TECH_CHANGED from RIL.

            int volteReplacementRat = mPhoneBase.getContext().getResources().getInteger(
                    com.android.internal.R.integer.config_volte_replacement_rat);
            Rlog.d(LOG_TAG, "updatePhoneObject: volteReplacementRat=" + volteReplacementRat);

            int voiceRat = mSS.getRilVoiceRadioTechnology();
            if (voiceRat == ServiceState.RIL_RADIO_TECHNOLOGY_LTE &&
                    volteReplacementRat == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
                voiceRat = ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT;
            }
            mPhoneBase.updatePhoneObject(voiceRat);
        }
    }

    @Override
    protected void log(String s) {
        Rlog.d(LOG_TAG, "[CdmaLteSST] " + s);