Merge "Enable QS open while notifications are scrolled below status bar" into sc-dev am: bc014c2d3d

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

Change-Id: I50ffe3912e352fc6b550901bb424f27bb0f1e7ba
This commit is contained in:
Lyn Han
2021-06-15 16:08:50 +00:00
committed by Automerger Merge Worker
2 changed files with 8 additions and 1 deletions

View File

@@ -4550,6 +4550,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
@ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
public void setQsExpansionFraction(float qsExpansionFraction) {
mQsExpansionFraction = qsExpansionFraction;
// If notifications are scrolled,
// clear out scrollY by the time we push notifications offscreen
if (mOwnScrollY > 0) {
setOwnScrollY((int) MathUtils.lerp(mOwnScrollY, 0, mQsExpansionFraction));
}
}
@ShadeViewRefactor(RefactorComponent.COORDINATOR)

View File

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