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

Commit a8269d97 authored by Roman Birg's avatar Roman Birg Committed by Steve Kondik
Browse files

policy: fix device sleeping with lid with incoming call



Change-Id: Idd538ee25009eeb4f5a9e11602ac739926493a81
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 3d6fd9af
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -6991,11 +6991,16 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        mPowerManager.setKeyboardVisibility(isBuiltInKeyboardVisible());

        if (mLidState == LID_CLOSED && mLidControlsSleep) {
            TelecomManager telephonyService = getTelecommService();
            if (!(telephonyService == null
                    || telephonyService.isRinging())) {
                mPowerManager.goToSleep(SystemClock.uptimeMillis(),
                        PowerManager.GO_TO_SLEEP_REASON_LID_SWITCH,
                        PowerManager.GO_TO_SLEEP_FLAG_NO_DOZE);
            }

        }

        synchronized (mLock) {
            updateWakeGestureListenerLp();
        }