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

Commit 307797ff authored by Amit Mahajan's avatar Amit Mahajan Committed by Gerrit Code Review
Browse files

Merge "Fix IMEI issue after setRadioCapability"

parents 68884732 97e3f6cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3137,7 +3137,7 @@ public class GsmCdmaPhone extends Phone {
                    Rlog.d(LOG_TAG, "get phone radio capability fail, no need to change " +
                            "mRadioCapability");
                } else {
                    radioCapabilityUpdated(rc);
                    radioCapabilityUpdated(rc, false);
                }
                Rlog.d(LOG_TAG, "EVENT_GET_RADIO_CAPABILITY: phone rc: " + rc);
                break;
+9 −1
Original line number Diff line number Diff line
@@ -4078,8 +4078,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     *  here.
     *
     *  @param rc the phone radio capability currently in effect for this phone.
     *  @param capabilitySwitched whether this method called after a radio capability switch
     *      completion or called when radios first become available.
     */
    public void radioCapabilityUpdated(RadioCapability rc) {
    public void radioCapabilityUpdated(RadioCapability rc, boolean capabilitySwitched) {
        // Called when radios first become available or after a capability switch
        // Update the cached value
        mRadioCapability.set(rc);
@@ -4089,6 +4091,12 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
                    com.android.internal.R.bool.skip_restoring_network_selection);
            sendSubscriptionSettings(restoreSelection);
        }

        // When radio capability switch is done, query IMEI value and update it in Phone objects
        // to make it in sync with the IMEI value currently used by Logical-Modem.
        if (capabilitySwitched) {
            mCi.getDeviceIdentity(obtainMessage(EVENT_GET_DEVICE_IDENTITY_DONE));
        }
    }

    public void sendSubscriptionSettings(boolean restoreNetworkSelection) {
+1 −1
Original line number Diff line number Diff line
@@ -481,7 +481,7 @@ public class ProxyController {
                mSetRadioAccessFamilyStatus[id] = SET_RC_STATUS_SUCCESS;
                // The modems may have been restarted and forgotten this
                mPhoneSwitcher.onRadioCapChanged(id);
                mPhones[id].radioCapabilityUpdated(rc);
                mPhones[id].radioCapabilityUpdated(rc, true);
            }

            mRadioAccessFamilyStatusCounter--;