summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-12-02 13:50:45 -0500
committerMike Lockwood <lockwood@android.com>2009-12-02 13:50:45 -0500
commit15ee33d4d475dc31709808a64120e56d555e992e (patch)
tree04aff69216ff546d872e4980a599b294952820d4
parente7ef42416088235d9e220e3b031d4f612f436a06 (diff)
downloadbase-15ee33d4d475dc31709808a64120e56d555e992e.tar.gz
Revert "Fix problems with KeyguardManager.exitKeyguardSecurely() and the FLAG_SHOW_WHEN_LOCKED window manager flag."
We have a better solution for this in the Phone app. This reverts commit b684251e8f1e85ea9483af2b80bc92f0fd8ded1c.
-rw-r--r--phone/com/android/internal/policy/impl/KeyguardViewMediator.java30
1 files changed, 7 insertions, 23 deletions
diff --git a/phone/com/android/internal/policy/impl/KeyguardViewMediator.java b/phone/com/android/internal/policy/impl/KeyguardViewMediator.java
index 17586be..6b9db60 100644
--- a/phone/com/android/internal/policy/impl/KeyguardViewMediator.java
+++ b/phone/com/android/internal/policy/impl/KeyguardViewMediator.java
@@ -170,7 +170,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;
@@ -398,31 +398,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();