diff options
author | Wink Saville <wink@google.com> | 2012-10-06 22:51:14 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-06 22:51:15 -0700 |
commit | 682428cb5e85d8bcc85685808b3f0e88716712a2 (patch) | |
tree | 3db8e8195f3ff863e5369b4dbe67189276cf9814 | |
parent | 205e3cb53a164c6d06b61dee9c2973038ae522e2 (diff) | |
parent | f860a3f42f87c9c8572623aff33349168d689477 (diff) | |
download | frameworks_opt_telephony-682428cb5e85d8bcc85685808b3f0e88716712a2.zip frameworks_opt_telephony-682428cb5e85d8bcc85685808b3f0e88716712a2.tar.gz frameworks_opt_telephony-682428cb5e85d8bcc85685808b3f0e88716712a2.tar.bz2 |
Merge "Fake sim status changed appropriately" into jb-mr1-dev
-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; |