Skip to content

Commit e376122

Browse files
jjpprrrraswin7469
authored andcommitted
AuthRippleController: Always finish the LightRevealScrim
The unlock ripple animation triggers a CircleReveal effect of the LightRevealScrim. The CircleReveal uses a ValueAnimator that gives in when something else takes over the reveal. If the taking over happens till the end of the animator, the revealAmount of the CircleReveal will not be updated, thus leaving a black-white radial gradient patten in the notification panel background. Make sure to always finish the reveal in such case, by setting the revealAmount when the animator is approaching the end. Test: put an app in landscape, lock the screen, unlock with a physical fingerprint sensor, and check the notification panel Change-Id: Id96404de524b32146bb776210b006b75fd035017 Signed-off-by: Chenyang Zhong <[email protected]> Signed-off-by: minaripenguin37 <[email protected]> Signed-off-by: minaripenguin <[email protected]>
1 parent 64e4d64 commit e376122

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ class AuthRippleController @Inject constructor(
202202
addUpdateListener { animator ->
203203
if (lightRevealScrim.revealEffect != circleReveal) {
204204
// if something else took over the reveal, let's cancel ourselves
205+
// When the animator is almost done, fully reveal the scrim.
206+
if (animator.animatedValue as Float >= 0.9999f) {
207+
lightRevealScrim.revealAmount = 1f
208+
}
205209
cancel()
206210
return@addUpdateListener
207211
}

0 commit comments

Comments
 (0)