From d1dc2f334cba2a934f62a96cb2aae1312f6dc146 Mon Sep 17 00:00:00 2001 From: Dave Mankoff Date: Mon, 22 Jun 2020 12:38:26 -0400 Subject: [PATCH] Ensure doze sensors can be registered when screen on. Prior to this, the sensors were always off if the screen was on. This meant that if a notifciation came in, the phone wouldn't react to being picked up (the screen would show the notification but otherwise remain dim). With this change, the phone can now wake up. Fixes: 159086388 Test: manual Change-Id: Ifdf21fbadc9381e843f4656aeacdfce4a12d02c8 --- .../SystemUI/src/com/android/systemui/doze/DozeTriggers.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java index c4e69755afeac..308d753cea666 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java +++ b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java @@ -416,6 +416,9 @@ public class DozeTriggers implements DozeMachine.Part { mDockManager.removeListener(mDockEventListener); mDozeSensors.setListening(false); mDozeSensors.setProxListening(false); + mWantSensors = false; + mWantProx = false; + mWantTouchScreenSensors = false; break; default: } @@ -431,7 +434,7 @@ public class DozeTriggers implements DozeMachine.Part { mDozeSensors.setTouchscreenSensorsListening(mWantTouchScreenSensors); } else { mDozeSensors.setProxListening(false); - mDozeSensors.setListening(false); + mDozeSensors.setListening(mWantSensors); } }