Quickly fade out the UDFPS icon on launch animations

As per the UX spec, the UDFPS icon will fade out in the first 83ms
of the launch transition animation.

Fixes: 276712829
Test: manually launch QR reader quick affordance
on the lock screen when UDFPS is enrolled, see the
UDFPS icon fades out BEFORE the activity is launched

Change-Id: I8293fd3b2e03859636496f3053ff3b33357bbdfe
This commit is contained in:
Beverly
2023-04-25 19:57:35 +00:00
committed by Beverly Tai
parent 4db7d7ac85
commit 6187d99828

View File

@@ -464,7 +464,12 @@ constructor(
// Fade out the icon if we are animating an activity launch over the lockscreen and the
// activity didn't request the UDFPS.
if (isLaunchingActivity && !udfpsRequested) {
alpha = (alpha * (1.0f - activityLaunchProgress)).toInt()
val udfpsActivityLaunchAlphaMultiplier =
1f -
(activityLaunchProgress *
(ActivityLaunchAnimator.TIMINGS.totalDuration / 83))
.coerceIn(0f, 1f)
alpha = (alpha * udfpsActivityLaunchAlphaMultiplier).toInt()
}
// Fade out alpha when a dialog is shown