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.
This commit is contained in:
Mike Lockwood
2009-12-03 11:12:04 -08:00
committed by Android Git Automerger

View File

@@ -282,8 +282,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) {
@@ -314,6 +315,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();
}