summaryrefslogtreecommitdiffstats
path: root/policy/com
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-12-03 08:41:44 -0500
committerMike Lockwood <lockwood@android.com>2009-12-03 08:41:44 -0500
commitce27776887fb252e08667c16e6945c7fecf33368 (patch)
treef82b26a709e079c2aa17cb155f885e10a9dd95ac /policy/com
parent5d258b6b17eb258ca728f27907d0b24697ab72c9 (diff)
downloadframeworks_base-ce27776887fb252e08667c16e6945c7fecf33368.zip
frameworks_base-ce27776887fb252e08667c16e6945c7fecf33368.tar.gz
frameworks_base-ce27776887fb252e08667c16e6945c7fecf33368.tar.bz2
Do not show keyguard if screen is turned off by proximity sensor.
Fixes bug b/2300622 (Proximity sensor always blows up the lock screen while in call) Change-Id: I85572973c142a72b3bba0bb032e5d2f710b5e36c Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'policy/com')
-rw-r--r--policy/com/android/internal/policy/impl/KeyguardViewMediator.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
index 6b9db60..8d71146 100644
--- a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
+++ b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
@@ -280,8 +280,9 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
/**
* Called to let us know the screen was turned off.
- * @param why either {@link WindowManagerPolicy#OFF_BECAUSE_OF_USER} or
- * {@link WindowManagerPolicy#OFF_BECAUSE_OF_TIMEOUT}.
+ * @param why either {@link WindowManagerPolicy#OFF_BECAUSE_OF_USER},
+ * {@link WindowManagerPolicy#OFF_BECAUSE_OF_TIMEOUT} or
+ * {@link WindowManagerPolicy#OFF_BECAUSE_OF_PROX_SENSOR}.
*/
public void onScreenTurnedOff(int why) {
synchronized (this) {
@@ -312,6 +313,8 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
sender);
if (DEBUG) Log.d(TAG, "setting alarm to turn off keyguard, seq = "
+ mDelayedShowingSequence);
+ } else if (why == WindowManagerPolicy.OFF_BECAUSE_OF_PROX_SENSOR) {
+ // Do not enable the keyguard if the prox sensor forced the screen off.
} else {
doKeyguard();
}