From a73d30e2974c0ab481214bad43e7cc488615d7b7 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 Fixes: 197160246 Merged-In: I86a73dacfd2fc4f5b910e1e1e4f6535e91d00da3 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 3ca7a9face955..22d7a3ff44f06 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewController.java @@ -153,7 +153,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController