From 2cda9f6b96a867546556f033eb8afae93ab3582c Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Thu, 23 May 2019 15:36:11 -0700 Subject: [PATCH] Adb command to authenticate earlier Test: adb shell setprop persist.sysui.wake_performs_auth 1 Fixes: 133447404 Change-Id: I89a5a97c1b5dc7664f65241c535cc18ee6264e65 --- .../src/com/android/systemui/statusbar/phone/StatusBar.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 4e8f584133030..e4c946bd0c0c1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -3890,6 +3890,8 @@ public class StatusBar extends SystemUI implements DemoMode, private boolean mAnimateWakeup; private boolean mAnimateScreenOff; private boolean mIgnoreTouchWhilePulsing; + private boolean mWakeLockScreenPerformsAuth = SystemProperties.getBoolean( + "persist.sysui.wake_performs_auth", false); @Override public String toString() { @@ -3945,7 +3947,9 @@ public class StatusBar extends SystemUI implements DemoMode, mStatusBarWindow.suppressWakeUpGesture(true); } - boolean passiveAuthInterrupt = reason == DozeLog.PULSE_REASON_NOTIFICATION; + boolean passiveAuthInterrupt = reason == DozeLog.PULSE_REASON_NOTIFICATION || ( + 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.