Do not execute face auth when notification

There's a big power cost and very high likelihood of failing

Test: manual
Test: atest StatusBarTest
Fixes: 134551789
Change-Id: I6593797316e6e24180ad79a37aed2de8aa12fd96
This commit is contained in:
Lucas Dupin
2019-06-13 10:08:19 -07:00
parent 24046b674c
commit a422c09e02
2 changed files with 5 additions and 5 deletions

View File

@@ -3947,9 +3947,8 @@ public class StatusBar extends SystemUI implements DemoMode,
mStatusBarWindow.suppressWakeUpGesture(true);
}
boolean passiveAuthInterrupt = reason == DozeLog.PULSE_REASON_NOTIFICATION || (
reason == DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN
&& mWakeLockScreenPerformsAuth);
boolean passiveAuthInterrupt = reason == DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN
&& mWakeLockScreenPerformsAuth;
// 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.

View File

@@ -639,10 +639,10 @@ public class StatusBarTest extends SysuiTestCase {
@Test
public void testPulseWhileDozing_notifyAuthInterrupt() {
HashSet<Integer> reasonsWantingAuth = new HashSet<>(
Collections.singletonList(DozeLog.PULSE_REASON_NOTIFICATION));
Collections.singletonList(DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN));
HashSet<Integer> reasonsSkippingAuth = new HashSet<>(
Arrays.asList(DozeLog.PULSE_REASON_INTENT,
DozeLog.PULSE_REASON_SENSOR_WAKE_LOCK_SCREEN,
DozeLog.PULSE_REASON_NOTIFICATION,
DozeLog.PULSE_REASON_SENSOR_SIGMOTION,
DozeLog.REASON_SENSOR_PICKUP,
DozeLog.REASON_SENSOR_DOUBLE_TAP,
@@ -661,6 +661,7 @@ public class StatusBarTest extends SysuiTestCase {
return null;
}).when(mDozeScrimController).pulse(any(), anyInt());
mStatusBar.mDozeServiceHost.mWakeLockScreenPerformsAuth = true;
for (int i = 0; i < DozeLog.REASONS; i++) {
reset(mKeyguardUpdateMonitor);
mStatusBar.mDozeServiceHost.pulseWhileDozing(mock(DozeHost.PulseCallback.class), i);