Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef469c33 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I85572973 into eclair

* changes:
  Do not show keyguard if screen is turned off by proximity sensor.
parents 15620ce4 ce277768
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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();
            }