Fixing quick settings locked in split shade

Values of scrollY and range to top in split shade made "mAmbientState.getScrollY() <= scrollRangeToTop" always false and thus qs expansion was always disabled.

Test: Expand split shade, expand QS
Fixes: 191622712
Fixes: 191226077
Change-Id: I916a895aa7abeaf3e5739b503458fe47aac219c2
This commit is contained in:
Michal Brzezinski
2021-06-21 18:14:40 +01:00
committed by Michał Brzeziński
parent 235a0bf9bd
commit ec3ed24507

View File

@@ -2234,8 +2234,9 @@ public class NotificationPanelViewController extends PanelViewController {
private void updateQSExpansionEnabledAmbient() {
final float scrollRangeToTop = mAmbientState.getTopPadding() - mQuickQsOffsetHeight;
mQsExpansionEnabledAmbient =
mAmbientState.getScrollY() <= scrollRangeToTop && !mAmbientState.isShadeOpening();
mQsExpansionEnabledAmbient = mShouldUseSplitNotificationShade
|| (mAmbientState.getScrollY() <= scrollRangeToTop
&& !mAmbientState.isShadeOpening());
setQsExpansionEnabled();
}