am db0ec648: Merge change I85572973 into eclair
Merge commit 'db0ec6480b806799f05f3d6fd04d742564af8f2f' into eclair-mr2
* commit 'db0ec6480b806799f05f3d6fd04d742564af8f2f':
Do not show keyguard if screen is turned off by proximity sensor.
diff --git a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
index 2e97e14..99c3b53 100644
--- a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
+++ b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
@@ -282,8 +282,9 @@
/**
* 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) {
@@ -314,6 +315,8 @@
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();
}