commit | 334ebcea1bd4c211b288878881610c5191cb30b3 | [log] [tgz] |
---|---|---|
author | Aaron Liu <aaronjli@google.com> | Thu Jul 20 15:14:36 2023 -0700 |
committer | Aaron Liu <aaronjli@google.com> | Thu Aug 03 18:04:58 2023 +0000 |
tree | e90f5a48796a9fc58929a31bb4887cb9ea7326fc | |
parent | 890f17187f6023e7da78603154d52783d1081b19 [diff] |
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 dc072507d0f52deb7e23ca5618816dbf18952204)
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java index 841b5b3..b2d8113 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -1192,6 +1192,8 @@ }); mPopup.show(); }); + + mUserSwitcherViewGroup.setAlpha(0f); } @Override
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBouncerViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBouncerViewBinder.kt index c1aefc7..bdce7d4 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBouncerViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBouncerViewBinder.kt
@@ -112,6 +112,8 @@ 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(