Loading policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java +7 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -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)) { Loading Loading @@ -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); Loading policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +17 −1 Original line number Diff line number Diff line Loading @@ -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); } } }; Loading Loading @@ -307,6 +320,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { } public void recreateMe(Configuration config) { if (DEBUG) Log.v(TAG, "recreateMe()"); removeCallbacks(mRecreateRunnable); post(mRecreateRunnable); } Loading Loading @@ -524,6 +538,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { public void reset() { mIsVerifyUnlockOnly = false; mForgotPattern = false; if (DEBUG) Log.v(TAG, "reset()"); post(mRecreateRunnable); } Loading Loading @@ -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); } Loading Loading
policy/src/com/android/internal/policy/impl/KeyguardUpdateMonitor.java +7 −0 Original line number Diff line number Diff line Loading @@ -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, Loading Loading @@ -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)) { Loading Loading @@ -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); Loading
policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +17 −1 Original line number Diff line number Diff line Loading @@ -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); } } }; Loading Loading @@ -307,6 +320,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { } public void recreateMe(Configuration config) { if (DEBUG) Log.v(TAG, "recreateMe()"); removeCallbacks(mRecreateRunnable); post(mRecreateRunnable); } Loading Loading @@ -524,6 +538,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase { public void reset() { mIsVerifyUnlockOnly = false; mForgotPattern = false; if (DEBUG) Log.v(TAG, "reset()"); post(mRecreateRunnable); } Loading Loading @@ -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); } Loading