From ea50684c124b2922c8b96c748d4ccdbda316616a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6llner?= Date: Wed, 2 Mar 2022 16:48:01 +0100 Subject: [PATCH] [Motion] Split-shade expansion on LS: disable depth effect Disables the depth change effect of the wallpaper when expanding the shade, to match the motion spec for T. Fixes: 222282930 Test: Manually Change-Id: Ifbcbec9a6cd37154c728b07db61bd507c4ec1351 --- packages/SystemUI/res/values-sw600dp-land/dimens.xml | 5 +++-- .../statusbar/LockscreenShadeTransitionController.kt | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/res/values-sw600dp-land/dimens.xml b/packages/SystemUI/res/values-sw600dp-land/dimens.xml index 1894b0c0266fb..117404bad46e6 100644 --- a/packages/SystemUI/res/values-sw600dp-land/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp-land/dimens.xml @@ -62,8 +62,9 @@ @dimen/lockscreen_shade_full_transition_distance - @dimen/lockscreen_shade_full_transition_distance + change. + On split-shade, there should be no depth effect, so setting the value to 0. --> + 0dp diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt index 263463050d41c..5adb9e55a9df6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt @@ -424,8 +424,11 @@ class LockscreenShadeTransitionController @Inject constructor( MathUtils.saturate(dragDownAmount / npvcKeyguardContentAlphaTransitionDistance) notificationPanelController.setKeyguardOnlyContentAlpha(1.0f - npvcProgress) - val depthProgress = MathUtils.saturate(dragDownAmount / depthControllerTransitionDistance) - depthController.transitionToFullShadeProgress = depthProgress + if (depthControllerTransitionDistance > 0) { + val depthProgress = + MathUtils.saturate(dragDownAmount / depthControllerTransitionDistance) + depthController.transitionToFullShadeProgress = depthProgress + } val udfpsProgress = MathUtils.saturate(dragDownAmount / udfpsTransitionDistance) udfpsKeyguardViewController?.setTransitionToFullShadeProgress(udfpsProgress)