From f2267af0491ab860a887d10ddb55bb8749de41d9 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Fri, 7 May 2021 22:37:20 +0200 Subject: [PATCH] Fixed an issue where the qs position was wrong while bypassing The header wasn't translated at all in the default state, but only when pulse expanding. Changing it to also be translated by default fixes this. Fixes: 187316916 Test: use bypass, observe no clipping Change-Id: Ic20d717affa0a16f69480e472795e9cef2c692f3 --- .../NotificationPanelViewController.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index 20b37e26dceeb..c0d713b852876 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -2574,16 +2574,19 @@ public class NotificationPanelViewController extends PanelViewController { // Small parallax as we pull down and clip QS startHeight = -mQsExpansionHeight * 0.2f; } - if (mKeyguardBypassController.getBypassEnabled() && isOnKeyguard() - && mNotificationStackScrollLayoutController.isPulseExpanding()) { - if (!mPulseExpansionHandler.isExpanding() - && !mPulseExpansionHandler.getLeavingLockscreen()) { - // If we aborted the expansion we need to make sure the header doesn't reappear - // again after the header has animated away - appearAmount = 0; + if (mKeyguardBypassController.getBypassEnabled() && isOnKeyguard()) { + if (mNotificationStackScrollLayoutController.isPulseExpanding()) { + if (!mPulseExpansionHandler.isExpanding() + && !mPulseExpansionHandler.getLeavingLockscreen()) { + // If we aborted the expansion we need to make sure the header doesn't reappear + // again after the header has animated away + appearAmount = 0; + } else { + appearAmount = mNotificationStackScrollLayoutController + .calculateAppearFractionBypass(); + } } else { - appearAmount = mNotificationStackScrollLayoutController - .calculateAppearFractionBypass(); + appearAmount = 0.0f; } startHeight = -mQs.getQsMinExpansionHeight(); }