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

Commit 97e3f6cc authored by Sandeep Gutta's avatar Sandeep Gutta
Browse files

Fix IMEI issue after setRadioCapability

Query IMEI for both slots after SetRadioCapability completed.

This will ensure we have the right IMEI's to display to the
user corresponds to each SIM card after logical Modemid
maping changed w.r.t each Phone object.

Bug: 175092322
Test: Verified setRadioCapability() and DDS switch manually
Change-Id: I580d2330d24d12a908cc21b85173d0945184b1f5
parent 6ecb63f1
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--;