Merge "Ensure that setVisibility is the" into tm-qpr-dev am: 453faac20f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22357879

Change-Id: Ideff48a0431872cba3121d78652b71729f76ac01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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 468a6b5..fc0e6cb 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
@@ -110,11 +110,11 @@
                     viewModel.setBouncerViewDelegate(delegate)
                     launch {
                         viewModel.isShowing.collect { isShowing ->
+                            view.visibility = if (isShowing) View.VISIBLE else View.INVISIBLE
                             if (isShowing) {
                                 // Reset Security Container entirely.
                                 securityContainerController.reinflateViewFlipper {
                                     // Reset Security Container entirely.
-                                    view.visibility = View.VISIBLE
                                     securityContainerController.onBouncerVisibilityChanged(
                                         /* isVisible= */ true
                                     )
@@ -127,7 +127,6 @@
                                     )
                                 }
                             } else {
-                                view.visibility = View.INVISIBLE
                                 securityContainerController.onBouncerVisibilityChanged(
                                     /* isVisible= */ false
                                 )