Merge "Fixed an issue where the qs position was wrong while bypassing" into sc-dev

This commit is contained in:
Selim Cinek
2021-05-10 13:56:04 +00:00
committed by Android (Google) Code Review

View File

@@ -2574,8 +2574,8 @@ public class NotificationPanelViewController extends PanelViewController {
// Small parallax as we pull down and clip QS // Small parallax as we pull down and clip QS
startHeight = -mQsExpansionHeight * 0.2f; startHeight = -mQsExpansionHeight * 0.2f;
} }
if (mKeyguardBypassController.getBypassEnabled() && isOnKeyguard() if (mKeyguardBypassController.getBypassEnabled() && isOnKeyguard()) {
&& mNotificationStackScrollLayoutController.isPulseExpanding()) { if (mNotificationStackScrollLayoutController.isPulseExpanding()) {
if (!mPulseExpansionHandler.isExpanding() if (!mPulseExpansionHandler.isExpanding()
&& !mPulseExpansionHandler.getLeavingLockscreen()) { && !mPulseExpansionHandler.getLeavingLockscreen()) {
// If we aborted the expansion we need to make sure the header doesn't reappear // If we aborted the expansion we need to make sure the header doesn't reappear
@@ -2585,6 +2585,9 @@ public class NotificationPanelViewController extends PanelViewController {
appearAmount = mNotificationStackScrollLayoutController appearAmount = mNotificationStackScrollLayoutController
.calculateAppearFractionBypass(); .calculateAppearFractionBypass();
} }
} else {
appearAmount = 0.0f;
}
startHeight = -mQs.getQsMinExpansionHeight(); startHeight = -mQs.getQsMinExpansionHeight();
} }
float translation = MathUtils.lerp(startHeight, 0, Math.min(1.0f, appearAmount)); float translation = MathUtils.lerp(startHeight, 0, Math.min(1.0f, appearAmount));