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

Commit b52b572d authored by Amit Mahajan's avatar Amit Mahajan Committed by Android (Google) Code Review
Browse files

Merge "Read SIM when radio state is available on FBE devices." into nyc-mr1-dev

parents 14cc6cf7 7695051b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.os.Message;
import android.os.Registrant;
import android.os.RegistrantList;
import android.os.SystemProperties;
import android.os.storage.StorageManager;
import android.telephony.TelephonyManager;
import android.telephony.Rlog;
import android.text.format.Time;
@@ -122,7 +123,12 @@ 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 (DECRYPT_STATE.equals(SystemProperties.get("vold.decrypt"))) {
            // If the device has been decrypted or FBE is supported, read SIM when radio state is
            // available.
            // 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()) {
                mCis[i].registerForAvailable(this, EVENT_ICC_STATUS_CHANGED, index);
            } else {
                mCis[i].registerForOn(this, EVENT_ICC_STATUS_CHANGED, index);