Set initial udfps alpha state to 0f

To avoid flicker of icon when it's first attached
in case it shouldn't be immediately shown. The transition
will be the first to update the view's alpha.

Test: manually enable udfps refactor, enroll udfps,
observe transition between home => AOD
Bug: 278719514

Change-Id: I752008928cd619c3b32af8b5b0164292bc23d662
This commit is contained in:
Beverly
2023-07-12 18:51:36 +00:00
parent f0ba4ff127
commit 3ca5633054
3 changed files with 3 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ object UdfpsAodFingerprintViewBinder {
view: LottieAnimationView,
viewModel: UdfpsAodViewModel,
) {
view.alpha = 0f
view.repeatWhenAttached {
repeatOnLifecycle(Lifecycle.State.STARTED) {
launch {

View File

@@ -38,6 +38,7 @@ object UdfpsBackgroundViewBinder {
view: ImageView,
viewModel: BackgroundViewModel,
) {
view.alpha = 0f
view.repeatWhenAttached {
repeatOnLifecycle(Lifecycle.State.STARTED) {
launch {

View File

@@ -42,6 +42,7 @@ object UdfpsFingerprintViewBinder {
view: LottieAnimationView,
viewModel: FingerprintViewModel,
) {
view.alpha = 0f
view.repeatWhenAttached {
repeatOnLifecycle(Lifecycle.State.STARTED) {
launch {