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

Commit fa7ee16d authored by Pawit Pornkitprasan's avatar Pawit Pornkitprasan Committed by Ethan Chen
Browse files

UiccController: use registerForAvailable only for persist.radio.apm_sim_not_pwdn

Some QCOM RILs allow the SIM to be loaded in airplane mode, thus
CAF changed the callback to registerForAvailable, but that does
not work on other RILs where the SIM information will not be
loaded successfully.

Change-Id: I9f9124417db2fe983e716a2825fc08d87511f8aa
parent cd35dc0b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -126,7 +126,10 @@ 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 (DECRYPT_STATE.equals(SystemProperties.get("vold.decrypt")) ||
                    SystemProperties.getBoolean("persist.radio.apm_sim_not_pwdn", false)) {
                // Reading ICC status in airplane mode is only supported in QCOM
                // RILs when this property is set to true
                mCis[i].registerForAvailable(this, EVENT_ICC_STATUS_CHANGED, index);
            } else {
                mCis[i].registerForOn(this, EVENT_ICC_STATUS_CHANGED, index);