diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index 553ba53a3d91..7254e090e32f 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -2482,17 +2482,23 @@ public final class NotificationPanelViewController extends PanelViewController { mDepthController.setQsPanelExpansion(qsExpansionFraction); mStatusBarKeyguardViewManager.setQsExpansion(qsExpansionFraction); - // updateQsExpansion will get called whenever mTransitionToFullShadeProgress or - // mLockscreenShadeTransitionController.getDragProgress change. - // When in lockscreen, getDragProgress indicates the true expanded fraction of QS - float shadeExpandedFraction = mTransitioningToFullShadeProgress > 0 - ? mLockscreenShadeTransitionController.getQSDragProgress() + float shadeExpandedFraction = isOnKeyguard() + ? getLockscreenShadeDragProgress() : getExpandedFraction(); mLargeScreenShadeHeaderController.setShadeExpandedFraction(shadeExpandedFraction); mLargeScreenShadeHeaderController.setQsExpandedFraction(qsExpansionFraction); mLargeScreenShadeHeaderController.setQsVisible(mQsVisible); } + private float getLockscreenShadeDragProgress() { + // mTransitioningToFullShadeProgress > 0 means we're doing regular lockscreen to shade + // transition. If that's not the case we should follow QS expansion fraction for when + // user is pulling from the same top to go directly to expanded QS + return mTransitioningToFullShadeProgress > 0 + ? mLockscreenShadeTransitionController.getQSDragProgress() + : computeQsExpansionFraction(); + } + private void onStackYChanged(boolean shouldAnimate) { if (mQs != null) { if (shouldAnimate) { @@ -4759,9 +4765,7 @@ public final class NotificationPanelViewController extends PanelViewController { @Override public float getLockscreenShadeDragProgress() { - return mTransitioningToFullShadeProgress > 0 - ? mLockscreenShadeTransitionController.getQSDragProgress() - : computeQsExpansionFraction(); + return NotificationPanelViewController.this.getLockscreenShadeDragProgress(); } }; |