summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Tsuji <tsuji@google.com>2021-07-22 15:12:10 -0400
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-23 17:55:19 +0000
commit73774fc8f3afb47c1166c75b471839d1af634384 (patch)
tree09fc045318e985f2e93a270bf6f1df83f83c7698
parent78d4c72e53da68f9a7a7b1deb520c7e19025c191 (diff)
Reset to LiftReveal when going to sleep due to timing out, after a biometric auth.
This was causing the device to sleep using the CircleReveal, since it wasn't allowed to be reset to LiftReveal if we went to sleep from timeout (vs. a power button press, where it'd be reset to PowerButtonReveal). If the device was subsequently woken up via a tap (not a power press or a lift), the CircleReveal remained as the reveal effect. The reveal amount for a CircleReveal is controlled by the biometric auth controller, but since we weren't actually waking up from a biometric auth, nothing happened and the reveal amount remained at 0f. Since you can't "go to sleep from a biometric auth", this is a safe fix to make sure we don't leave the CircleReveal set as the reveal effect. Fixes: 192912744 Test: wake the device via fingerprint while it's asleep, then let it time out and receive a HUN Change-Id: I86f2ad17d175c40c159de9ed6372490fb6e276f0 (cherry picked from commit 9ea5d02507b0ea9060642da81d971d118b579e1c)
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java6
1 files changed, 5 insertions, 1 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 742eae391a75..4d5c053b7e35 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -3950,7 +3950,11 @@ public class StatusBar extends SystemUI implements DemoMode,
|| !wakingUp && mWakefulnessLifecycle.getLastSleepReason()
== PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON) {
mLightRevealScrim.setRevealEffect(mPowerButtonReveal);
- } else if (!(mLightRevealScrim.getRevealEffect() instanceof CircleReveal)) {
+ } else if (!wakingUp || !(mLightRevealScrim.getRevealEffect() instanceof CircleReveal)) {
+ // If we're going to sleep, but it's not from the power button, use the default reveal.
+ // If we're waking up, only use the default reveal if the biometric controller didn't
+ // already set it to the circular reveal because we're waking up from a fingerprint/face
+ // auth.
mLightRevealScrim.setRevealEffect(LiftReveal.INSTANCE);
}
}