Apply correct squishiness when dragging down on LS

NPVC would pass 1 instead of the expected value to QSFragment, due to
being unaware of the lock screen expansion amount.

Bug: 214044434
Test: manually pull down QS on lock screen when media is present
Change-Id: I7d742eaad021c183decd7c7cabfd2638e94361fa
This commit is contained in:
Lucas Dupin
2022-01-26 11:41:05 -08:00
parent c5900ec571
commit e4918c2bc8

View File

@@ -2440,9 +2440,15 @@ public class NotificationPanelViewController extends PanelViewController {
private void updateQsExpansion() {
if (mQs == null) return;
final float squishiness =
mQsExpandImmediate || mQsExpanded ? 1f : mNotificationStackScrollLayoutController
.getNotificationSquishinessFraction();
final float squishiness;
if (mQsExpandImmediate || mQsExpanded) {
squishiness = 1;
} else if (mLockscreenShadeTransitionController.getQSDragProgress() > 0) {
squishiness = mLockscreenShadeTransitionController.getQSDragProgress();
} else {
squishiness = mNotificationStackScrollLayoutController
.getNotificationSquishinessFraction();
}
final float qsExpansionFraction = computeQsExpansionFraction();
final float adjustedExpansionFraction = mShouldUseSplitNotificationShade
? 1f : computeQsExpansionFraction();