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
This commit is contained in:
Beth Thibodeau
2021-07-22 15:00:07 -04:00
parent a16f9cc218
commit 04d1be91ef

View File

@@ -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());