summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chandru S <chandruis@google.com> 2024-12-17 19:44:48 +0000
committer Chandru S <chandruis@google.com> 2024-12-17 14:02:57 -0800
commit84dbf9809eb5c1af614b845a2bc6ad30b726c07c (patch)
treeb8f32a034ff28e0a41058f80f1672ffa37314c5a
parent37b9d5c976dae67d8a5b0da92e16991feb6e8fc8 (diff)
Invalidate the view to ensure it is redrawn after animators end
In certain scenarios, the view is never redrawn after we set drawDwell to false. Added additional locally to verify that this is causing the dwell ripple to remain onscreen. There are 3 animators in this view that respond to user interaction: 1. dwellPulseOutAnimator (onUdfps finger down and auth is actively happening) 2. retractDwellAnimator (when auth is successful or has failed, this animator retracts the dwell ripple back to intial hidden state) 3. fadeDwellAnimator (this zeroes out the alpha of the dwell ripple) fadeDwellAnimator runs ONLY if we start showing the bouncer AND either of the other 2 animators are still running. Couple of things that could have caused this bug to happen recently: 1. The timing of when we transition to bouncer and when the retractDwellAnimator animator finishes could have changed, maybe we are transitioning to bouncer a little earlier than before 2. Previously. something was forcing the AuthRippleView to be redrawn after we transition to the bouncer, causing the dwell ripple to be hidden, but that is not happening now. Fixes: 383039518 Test: verified manually, keep authenticating with unenrolled finger until we transition to the bouncer Flag: EXEMPT bugfix Change-Id: I3cd0ab7473254953875fadcd7e585da4f8d6eafb
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleView.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleView.kt
index 4c2dc41fb759..d8c628fd680b 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleView.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleView.kt
@@ -155,6 +155,7 @@ class AuthRippleView(context: Context?, attrs: AttributeSet?) : View(context, at
override fun onAnimationEnd(animation: Animator) {
drawDwell = false
resetDwellAlpha()
+ invalidate()
}
})
start()
@@ -191,6 +192,7 @@ class AuthRippleView(context: Context?, attrs: AttributeSet?) : View(context, at
override fun onAnimationEnd(animation: Animator) {
drawDwell = false
resetDwellAlpha()
+ invalidate()
}
})
start()
@@ -248,6 +250,7 @@ class AuthRippleView(context: Context?, attrs: AttributeSet?) : View(context, at
override fun onAnimationEnd(animation: Animator) {
drawDwell = false
+ invalidate()
}
})
start()