From 15fcb6d82c6258a7d34aa3faa11ce44c34ee80bb Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Sat, 9 Mar 2019 15:16:05 -0800 Subject: [PATCH] Only try to auth if there's a notification LS sensor isn't a strong signal Bug: 111414690 Test: manual Test: atest StatusBarTest Change-Id: I4c85709e5bb2691644a23260e72687569fc85810 --- .../src/com/android/systemui/statusbar/phone/StatusBar.java | 2 +- .../com/android/systemui/statusbar/phone/StatusBarTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index 183226507117e..60b16593bd73e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -3881,7 +3881,7 @@ public class StatusBar extends SystemUI implements DemoMode, return; } - boolean passiveAuthInterrupt = reason == DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN; + boolean passiveAuthInterrupt = reason == DozeLog.PULSE_REASON_NOTIFICATION; // Set the state to pulsing, so ScrimController will know what to do once we ask it to // execute the transition. The pulse callback will then be invoked when the scrims // are black, indicating that StatusBar is ready to present the rest of the UI. diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java index f8bfc54512f1d..cbbee39dfd7e9 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java @@ -641,10 +641,10 @@ public class StatusBarTest extends SysuiTestCase { @Test public void testPulseWhileDozing_notifyAuthInterrupt() { HashSet reasonsWantingAuth = new HashSet<>( - Collections.singletonList(DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN)); + Collections.singletonList(DozeLog.PULSE_REASON_NOTIFICATION)); HashSet reasonsSkippingAuth = new HashSet<>( Arrays.asList(DozeLog.PULSE_REASON_INTENT, - DozeLog.PULSE_REASON_NOTIFICATION, + DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN, DozeLog.PULSE_REASON_SENSOR_SIGMOTION, DozeLog.REASON_SENSOR_PICKUP, DozeLog.REASON_SENSOR_DOUBLE_TAP,