diff options
author | Danny Baumann <dannybaumann@web.de> | 2012-06-30 16:22:32 +0400 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2012-06-30 16:22:32 +0400 |
commit | ca0d4b92adc84c689f390896e088ef8f4ad68d53 (patch) | |
tree | a669a58a7d0e62e8bce2366ba6079e46ef1cf685 | |
parent | 44f9c784306665b040acab64b37aa514f8e22920 (diff) | |
parent | 142766a64ec74c7e9ec284beb78fffc0dc7df3c2 (diff) | |
download | frameworks_base-ca0d4b92adc84c689f390896e088ef8f4ad68d53.zip frameworks_base-ca0d4b92adc84c689f390896e088ef8f4ad68d53.tar.gz frameworks_base-ca0d4b92adc84c689f390896e088ef8f4ad68d53.tar.bz2 |
Merge "Don't let apps disable the SIM PIN entry screen." into ics
-rw-r--r-- | policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java index f03d93d..fbf673b 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java @@ -623,22 +623,6 @@ public class KeyguardViewMediator implements KeyguardViewCallback, * the keyguard to be shown. */ private void doKeyguardLocked() { - // if another app is disabling us, don't show - if (!mExternallyEnabled) { - if (DEBUG) Log.d(TAG, "doKeyguard: not showing because externally disabled"); - - // note: we *should* set mNeedToReshowWhenReenabled=true here, but that makes - // for an occasional ugly flicker in this situation: - // 1) receive a call with the screen on (no keyguard) or make a call - // 2) screen times out - // 3) user hits key to turn screen back on - // instead, we reenable the keyguard when we know the screen is off and the call - // ends (see the broadcast receiver below) - // TODO: clean this up when we have better support at the window manager level - // for apps that wish to be on top of the keyguard - return; - } - // if the keyguard is already showing, don't bother if (mKeyguardViewManager.isShowing()) { if (DEBUG) Log.d(TAG, "doKeyguard: not showing because it is already showing"); @@ -661,6 +645,22 @@ public class KeyguardViewMediator implements KeyguardViewCallback, return; } + // if another app is disabling us, don't show + if (!mExternallyEnabled && !lockedOrMissing) { + if (DEBUG) Log.d(TAG, "doKeyguard: not showing because externally disabled"); + + // note: we *should* set mNeedToReshowWhenReenabled=true here, but that makes + // for an occasional ugly flicker in this situation: + // 1) receive a call with the screen on (no keyguard) or make a call + // 2) screen times out + // 3) user hits key to turn screen back on + // instead, we reenable the keyguard when we know the screen is off and the call + // ends (see the broadcast receiver below) + // TODO: clean this up when we have better support at the window manager level + // for apps that wish to be on top of the keyguard + return; + } + if (mLockPatternUtils.isLockScreenDisabled() && !lockedOrMissing) { if (DEBUG) Log.d(TAG, "doKeyguard: not showing because lockscreen is off"); return; |