Fix user switcher flicker.

User switcher flickers when bouncer shows scrimmed. This is because when
the bouncer hides, the alpha of the view is considered to be 1f. When we
are showing the bouncer, we are asynchronously inflating the view and
waiting for this operation to complete to start the appear animation. In
order to fix this, we reset the view before making this async call to
ensure that the view alpha is 0f. It will be set to 1f in #appear.

Fixes: 290355544
Test: test pattern, pin, password back button and success.
Change-Id: I1680d66336b5b6d5d1065c85ac4b09ca56e12d7a
Merged-In: I1680d66336b5b6d5d1065c85ac4b09ca56e12d7a
(cherry picked from commit dc072507d0)
This commit is contained in:
Aaron Liu
2023-07-20 15:14:36 -07:00
parent 890f17187f
commit 334ebcea1b
2 changed files with 4 additions and 0 deletions

View File

@@ -1192,6 +1192,8 @@ public class KeyguardSecurityContainer extends ConstraintLayout {
});
mPopup.show();
});
mUserSwitcherViewGroup.setAlpha(0f);
}
@Override

View File

@@ -112,6 +112,8 @@ object KeyguardBouncerViewBinder {
viewModel.isShowing.collect { isShowing ->
view.visibility = if (isShowing) View.VISIBLE else View.INVISIBLE
if (isShowing) {
// Reset security container because these views are not reinflated.
securityContainerController.reset()
securityContainerController.reinflateViewFlipper {
// Reset Security Container entirely.
securityContainerController.onBouncerVisibilityChanged(