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

Commit 60780ab6 authored by kun.tang's avatar kun.tang Committed by android-build-merger
Browse files

Merge "Fix lost query sim status in UiccController when device is unencrypted." am: 39443c82

am: 1723f4d7

Change-Id: I8c794146dc6ce30c0289b63cd15a10f4c51da0e1
parents 3e111d19 1723f4d7
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -89,8 +89,6 @@ public class UiccController extends Handler {
    private static final int EVENT_RADIO_UNAVAILABLE = 3;
    private static final int EVENT_SIM_REFRESH = 4;

    private static final String DECRYPT_STATE = "trigger_restart_framework";

    private CommandsInterface[] mCis;
    private UiccCard[] mUiccCards = new UiccCard[TelephonyManager.getDefault().getPhoneCount()];

@@ -125,12 +123,11 @@ public class UiccController extends Handler {
            Integer index = new Integer(i);
            mCis[i].registerForIccStatusChanged(this, EVENT_ICC_STATUS_CHANGED, index);
            // TODO remove this once modem correctly notifies the unsols
            // If the device has been decrypted or FBE is supported, read SIM when radio state is
            // available.
            // If the device is unencrypted or has been decrypted or FBE is supported,
            // i.e. not in cryptkeeper bounce, read SIM when radio state isavailable.
            // Else wait for radio to be on. This is needed for the scenario when SIM is locked --
            // to avoid overlap of CryptKeeper and SIM unlock screen.
            if (DECRYPT_STATE.equals(SystemProperties.get("vold.decrypt")) ||
                    StorageManager.isFileEncryptedNativeOrEmulated()) {
            if (!StorageManager.inCryptKeeperBounce()) {
                mCis[i].registerForAvailable(this, EVENT_ICC_STATUS_CHANGED, index);
            } else {
                mCis[i].registerForOn(this, EVENT_ICC_STATUS_CHANGED, index);