diff options
-rw-r--r-- | src/java/com/android/internal/telephony/RIL.java | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java index e27c9c6..faae72a 100644 --- a/src/java/com/android/internal/telephony/RIL.java +++ b/src/java/com/android/internal/telephony/RIL.java @@ -2347,26 +2347,39 @@ public final class RIL extends BaseCommands implements CommandsInterface { } } - // Some devices do not send RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED so fake it. - // See b/7255789 + // Here and below fake RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, see b/7255789. + // This is needed otherwise we don't automatically transition to the main lock + // screen when the pin or puk is entered incorrectly. switch (rr.mRequest) { - case RIL_REQUEST_ENTER_SIM_PIN: case RIL_REQUEST_ENTER_SIM_PUK: - case RIL_REQUEST_ENTER_SIM_PIN2: case RIL_REQUEST_ENTER_SIM_PUK2: - case RIL_REQUEST_CHANGE_SIM_PIN: - case RIL_REQUEST_CHANGE_SIM_PIN2: - if (RILJ_LOGD) { - riljLog("fakeSimStatusChanged: reg count=" - + mIccStatusChangedRegistrants.size()); - } if (mIccStatusChangedRegistrants != null) { + if (RILJ_LOGD) { + riljLog("ON enter sim puk fakeSimStatusChanged: reg count=" + + mIccStatusChangedRegistrants.size()); + } mIccStatusChangedRegistrants.notifyRegistrants(); } break; } if (error != 0) { + switch (rr.mRequest) { + case RIL_REQUEST_ENTER_SIM_PIN: + case RIL_REQUEST_ENTER_SIM_PIN2: + case RIL_REQUEST_CHANGE_SIM_PIN: + case RIL_REQUEST_CHANGE_SIM_PIN2: + case RIL_REQUEST_SET_FACILITY_LOCK: + if (mIccStatusChangedRegistrants != null) { + if (RILJ_LOGD) { + riljLog("ON some errors fakeSimStatusChanged: reg count=" + + mIccStatusChangedRegistrants.size()); + } + mIccStatusChangedRegistrants.notifyRegistrants(); + } + break; + } + rr.onError(error, ret); rr.release(); return; |