From d4f676bde2551c2148bf843e10c3bf54736e4ff4 Mon Sep 17 00:00:00 2001 From: Michal Brzezinski Date: Tue, 22 Mar 2022 18:15:33 +0000 Subject: [PATCH] Fixing shade transition calculation logic. Fixing calculation of transitionToFullShadeProgress when transitioning from shade folded to shade unfolded, when it seems it wasn't reset correctly. Bug: 220703613 Test: unlock phone -> open shade -> unfold -> collapse shade with swipe up -> touches should be working Change-Id: Id66ced346ca175b62200e529b4cca747f5e24fab --- .../systemui/statusbar/LockscreenShadeTransitionController.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt index 4732a8c095007..4a9049f2ce282 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt @@ -441,7 +441,9 @@ class LockscreenShadeTransitionController @Inject constructor( } private fun transitionToShadeAmountCommon(dragDownAmount: Float) { - if (depthControllerTransitionDistance > 0) { + if (depthControllerTransitionDistance == 0) { // split shade + depthController.transitionToFullShadeProgress = 0f + } else { val depthProgress = MathUtils.saturate(dragDownAmount / depthControllerTransitionDistance) depthController.transitionToFullShadeProgress = depthProgress