summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2013-04-15 11:50:33 +0200
committerDanny Baumann <dannybaumann@web.de>2013-04-15 15:18:20 +0200
commit2b6b9c93215e6d27d24677b12ac8fcca282dcaae (patch)
treeb5d9c35b7cbe62699a867109a76d0a0781426a1f /policy
parentde19822372f7f70892731ab89a7da4eeda420c24 (diff)
downloadframeworks_base-2b6b9c93215e6d27d24677b12ac8fcca282dcaae.zip
frameworks_base-2b6b9c93215e6d27d24677b12ac8fcca282dcaae.tar.gz
frameworks_base-2b6b9c93215e6d27d24677b12ac8fcca282dcaae.tar.bz2
Don't let apps disable the SIM PIN entry screen.
As the user (who controls the app behaviour after all) likely doesn't see the PIN screen as a lock screen (he likely wants telephony) and the PIN screen is not shown on a timer-driven basis, it should be treated specially. Change-Id: I3572a80d4a515d72e3aa4a6e933e980fa4516c2b
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
index a505185..2cf4c8c 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewMediator.java
@@ -876,22 +876,6 @@ public class KeyguardViewMediator {
* Enable the keyguard if the settings are appropriate.
*/
private void doKeyguardLocked(Bundle options) {
- // 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");
@@ -914,6 +898,22 @@ public class KeyguardViewMediator {
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 (mUserManager.getUsers(true).size() < 2
&& mLockPatternUtils.isLockScreenDisabled() && !lockedOrMissing) {
if (DEBUG) Log.d(TAG, "doKeyguard: not showing because lockscreen is off");