diff options
author | Mike Lockwood <lockwood@android.com> | 2009-12-02 11:36:05 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-12-02 11:36:05 -0800 |
commit | 2f8a5cd29fc93e13ae6dba42db734dd992dcb5d5 (patch) | |
tree | 11b60c2aa0e5ccdd02fe71e5306fa44b257f4e2f /policy/com | |
parent | 4c8156e6152a65cb3925f6025349cb385574d772 (diff) | |
parent | 5d258b6b17eb258ca728f27907d0b24697ab72c9 (diff) | |
download | frameworks_base-2f8a5cd29fc93e13ae6dba42db734dd992dcb5d5.zip frameworks_base-2f8a5cd29fc93e13ae6dba42db734dd992dcb5d5.tar.gz frameworks_base-2f8a5cd29fc93e13ae6dba42db734dd992dcb5d5.tar.bz2 |
am 15ee33d4: Revert "Fix problems with KeyguardManager.exitKeyguardSecurely() and the FLAG_SHOW_WHEN_LOCKED window manager flag."
Merge commit '15ee33d4d475dc31709808a64120e56d555e992e' into eclair-mr2
* commit '15ee33d4d475dc31709808a64120e56d555e992e':
Revert "Fix problems with KeyguardManager.exitKeyguardSecurely() and the FLAG_SHOW_WHEN_LOCKED window manager flag."
Diffstat (limited to 'policy/com')
-rw-r--r-- | policy/com/android/internal/policy/impl/KeyguardViewMediator.java | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java index 1861ef9..2e97e14 100644 --- a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java +++ b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java @@ -172,7 +172,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback, // these are protected by synchronized (this) /** - * This is set to false if the keyguard is disabled via setKeyguardEnabled(false). + * External apps (like the phone app) can tell us to disable the keygaurd. */ private boolean mExternallyEnabled = true; @@ -400,31 +400,15 @@ public class KeyguardViewMediator implements KeyguardViewCallback, // don't allow this api when the device isn't provisioned if (DEBUG) Log.d(TAG, "ignoring because device isn't provisioned"); callback.onKeyguardExitResult(false); + } else if (mExternallyEnabled) { + // this only applies when the user has externally disabled the + // keyguard. this is unexpected and means the user is not + // using the api properly. + Log.w(TAG, "verifyUnlock called when not externally disabled"); + callback.onKeyguardExitResult(false); } else if (mExitSecureCallback != null) { // already in progress with someone else callback.onKeyguardExitResult(false); - } else if (mExternallyEnabled) { - if (mHidden) { - if (isSecure()) { - // if the current activity is in front of the keyguard, then - // pretend like we succeeded and we will hit the lock screen - // when the activity is launched. - // HACK ALERT - this is assuming that the callback will be used - // to start a new activity (current usage by Phone app). - callback.onKeyguardExitResult(true); - } else { - // call through to verifyUnlockLocked() so we can bypass - // the insecure keyguard screen. - mExitSecureCallback = callback; - verifyUnlockLocked(); - } - } else { - // this only applies when the user has externally disabled the keyguard - // and no other activities are in front of the keyguard. - // this is unexpected and means the user is not using the api properly. - Log.w(TAG, "verifyUnlock called when not externally disabled"); - callback.onKeyguardExitResult(false); - } } else { mExitSecureCallback = callback; verifyUnlockLocked(); |