Merge change 22959 into eclair

* changes:
  Don't activate keyguard if screen is turned off while proximity sensor is active.
This commit is contained in:
Android (Google) Code Review
2009-08-27 14:31:17 -07:00

View File

@@ -273,8 +273,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_PROXIMITY_SENSOR}.
*/
public void onScreenTurnedOff(int why) {
synchronized (this) {
@@ -305,7 +306,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
sender);
if (DEBUG) Log.d(TAG, "setting alarm to turn off keyguard, seq = "
+ mDelayedShowingSequence);
} else {
} else if (why != WindowManagerPolicy.OFF_BECAUSE_OF_PROXIMITY_SENSOR) {
doKeyguard();
}
}