diff options
author | Jim Miller <jaggies@google.com> | 2012-06-18 10:49:28 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-18 10:49:28 -0700 |
commit | 47add3e558e8a1a2839ce8e24e2bda136b265dd5 (patch) | |
tree | 27e975fb6a1d9312c6624a09b830b7c37b42df7a /policy | |
parent | 041982bf50b3ce4a26170c52c732f328f519f650 (diff) | |
parent | 5250db0bfd18aacbb6406212a84e3dd101e547e6 (diff) | |
download | frameworks_base-47add3e558e8a1a2839ce8e24e2bda136b265dd5.zip frameworks_base-47add3e558e8a1a2839ce8e24e2bda136b265dd5.tar.gz frameworks_base-47add3e558e8a1a2839ce8e24e2bda136b265dd5.tar.bz2 |
am 5250db0b: am b06be57f: Merge "Fix 6507787: fix MMI PUK unlock procedure" into jb-dev
* commit '5250db0bfd18aacbb6406212a84e3dd101e547e6':
Fix 6507787: fix MMI PUK unlock procedure
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java | 7 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java | 18 |
2 files changed, 24 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java index 87ec16b..dfe9134 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java @@ -105,6 +105,8 @@ public class KeyguardUpdateMonitor { protected static final int MSG_DPM_STATE_CHANGED = 309; protected static final int MSG_USER_CHANGED = 310; + protected static final boolean DEBUG_SIM_STATES = DEBUG || false; + /** * When we receive a * {@link com.android.internal.telephony.TelephonyIntents#ACTION_SIM_STATE_CHANGED} broadcast, @@ -292,6 +294,10 @@ public class KeyguardUpdateMonitor { MSG_BATTERY_UPDATE, new BatteryStatus(status, level, plugged, health)); mHandler.sendMessage(msg); } else if (TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(action)) { + if (DEBUG_SIM_STATES) { + Log.v(TAG, "action " + action + " state" + + intent.getStringExtra(IccCard.INTENT_KEY_ICC_STATE)); + } mHandler.sendMessage(mHandler.obtainMessage( MSG_SIM_STATE_CHANGE, SimArgs.fromIntent(intent))); } else if (AudioManager.RINGER_MODE_CHANGED_ACTION.equals(action)) { @@ -407,6 +413,7 @@ public class KeyguardUpdateMonitor { } if (state != IccCard.State.UNKNOWN && state != mSimState) { + if (DEBUG_SIM_STATES) Log.v(TAG, "dispatching state: " + state); mSimState = state; for (int i = 0; i < mSimStateCallbacks.size(); i++) { mSimStateCallbacks.get(i).onSimStateChanged(state); diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java index 518d8e9..35e7820 100644 --- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -202,8 +202,21 @@ public class LockPatternKeyguardView extends KeyguardViewBase { private Runnable mRecreateRunnable = new Runnable() { public void run() { - updateScreen(mMode, true); + Mode mode = mMode; + // If we were previously in a locked state but now it's Unknown, it means the phone + // was previously locked because of SIM state and has since been resolved. This + // bit of code checks this condition and dismisses keyguard. + boolean dismissAfterCreation = false; + if (mode == Mode.UnlockScreen && getUnlockMode() == UnlockMode.Unknown) { + if (DEBUG) Log.v(TAG, "Switch to Mode.LockScreen because SIM unlocked"); + mode = Mode.LockScreen; + dismissAfterCreation = true; + } + updateScreen(mode, true); restoreWidgetState(); + if (dismissAfterCreation) { + mKeyguardScreenCallback.keyguardDone(false); + } } }; @@ -307,6 +320,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { } public void recreateMe(Configuration config) { + if (DEBUG) Log.v(TAG, "recreateMe()"); removeCallbacks(mRecreateRunnable); post(mRecreateRunnable); } @@ -524,6 +538,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { public void reset() { mIsVerifyUnlockOnly = false; mForgotPattern = false; + if (DEBUG) Log.v(TAG, "reset()"); post(mRecreateRunnable); } @@ -673,6 +688,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { if (DEBUG_CONFIGURATION) Log.v(TAG, "**** re-creating lock screen since config changed"); saveWidgetState(); removeCallbacks(mRecreateRunnable); + if (DEBUG) Log.v(TAG, "recreating lockscreen because config changed"); post(mRecreateRunnable); } |