From 148d62f833eaa8e45d4d8708fc4e9c88bdf21149 Mon Sep 17 00:00:00 2001 From: Beverly Date: Fri, 27 Aug 2021 09:19:11 -0400 Subject: [PATCH] Update unpaused udfps alpha when showing udfps bouncer This will make sure the alpha is updated correctly before showing the udfps affordance. This CL also updates the dumpsys to be more accurate of the actual alpha value being used. Test: manual, atest UdfpsKeyguardViewControllerTest Bug: 197160246 Change-Id: I86a73dacfd2fc4f5b910e1e1e4f6535e91d00da3 --- .../biometrics/UdfpsKeyguardView.java | 7 +++++++ .../UdfpsKeyguardViewController.java | 9 ++++++--- .../UdfpsKeyguardViewControllerTest.java | 19 +++++++++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java index d46426a036215..9015396d26ab8 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardView.java @@ -155,6 +155,13 @@ public class UdfpsKeyguardView extends UdfpsAnimationView { updateAlpha(); } + /** + * @return alpha between 0 and 255 + */ + int getUnpausedAlpha() { + return mAlpha; + } + @Override protected int updateAlpha() { int alpha = super.updateAlpha(); diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java index 4a1d883131cea..679e27f456fcc 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java @@ -163,7 +163,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController