Prevent squishing of the QsMediaHost when not in split shade
The QSMediaHost was being squished by QSFragment. This is the
correct behavior for split shade as that media host is onscreen
when the squishiness happens. But when split shade is disabled,
then that view should not be squished.
Bug: 232528163
Test: Manually checked the repro steps
Change-Id: Ia5025ca0745ce82db9c99013768acbc210fd8b30
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
index 1422a25..fd78f6a 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
@@ -697,10 +697,12 @@
if (mQSAnimator != null) {
mQSAnimator.setPosition(expansion);
}
- if (mStatusBarStateController.getState() == StatusBarState.KEYGUARD
+ if (!mInSplitShade
+ || mStatusBarStateController.getState() == StatusBarState.KEYGUARD
|| mStatusBarStateController.getState() == StatusBarState.SHADE_LOCKED) {
// At beginning, state is 0 and will apply wrong squishiness to MediaHost in lockscreen
- // and media player expect no change by squishiness in lock screen shade
+ // and media player expect no change by squishiness in lock screen shade. Don't bother
+ // squishing mQsMediaHost when not in split shade to prevent problems with stale state.
mQsMediaHost.setSquishFraction(1.0F);
} else {
mQsMediaHost.setSquishFraction(mSquishinessFraction);