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

Commit c4589608 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge "Fix logic for power button overridding the "wait for prox negative state" after a call"

parents 69a5f6c3 db97f600
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -853,6 +853,14 @@ public class PowerManagerService extends IPowerManager.Stub
                if ((wl.flags & PowerManager.ACQUIRE_CAUSES_WAKEUP) != 0) {
                    int oldWakeLockState = mWakeLockState;
                    mWakeLockState = mLocks.reactivateScreenLocksLocked();

                    // Disable proximity sensor if if user presses power key while we are in the
                    // "waiting for proximity sensor to go negative" state.
                    if ((mWakeLockState & SCREEN_ON_BIT) != 0
                            && mProximitySensorActive && mProximityWakeLockCount == 0) {
                        mProximitySensorActive = false;
                    }

                    if (mSpew) {
                        Slog.d(TAG, "wakeup here mUserState=0x" + Integer.toHexString(mUserState)
                                + " mWakeLockState=0x"