From 04d1be91ef7c5e36db7143d72f011f05df261222 Mon Sep 17 00:00:00 2001 From: Beth Thibodeau Date: Thu, 22 Jul 2021 15:00:07 -0400 Subject: [PATCH] Reset alpha of media when not fading Since the QSAnimator can run even when QS is not visible, the media host could be set to alpha 0 when rotated to landscape, and never reset to 1 once rotated back to portrait. So, this explicitly resets the alpha if the animation builder is being set up in portrait mode. Fixes: 192939241 Test: follow repro steps in bug, observe media visible Change-Id: Ice6087b0d2dee0a575003bb888c93ea91cee931a --- packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java index a3180738fa60f..4fcd46c96fe3d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java @@ -423,6 +423,9 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha if (mQsPanelController.shouldUseHorizontalLayout() && mQsPanelController.mMediaHost.hostView != null) { builder.addFloat(mQsPanelController.mMediaHost.hostView, "alpha", 0, 1); + } else { + // In portrait, media view should always be visible + mQsPanelController.mMediaHost.hostView.setAlpha(1.0f); } mAllPagesDelayedAnimator = builder.build(); mAllViews.add(mSecurityFooter.getView());