diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt index 25a5b900f15a1..067caa98102b3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt @@ -87,6 +87,8 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() { row = helper.createRow() context.getOrCreateTestableResources() .addOverride(R.bool.config_use_split_notification_shade, false) + context.getOrCreateTestableResources() + .addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 100) transitionController = LockscreenShadeTransitionController( statusBarStateController = statusbarStateController, logger = logger, @@ -246,6 +248,17 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() { verify(depthController).transitionToFullShadeProgress = anyFloat() } + @Test + fun testDragDownAmount_depthDistanceIsZero_doesNotSetProgress() { + context.getOrCreateTestableResources() + .addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 0) + configurationController.notifyConfigurationChanged() + + transitionController.dragDownAmount = 10f + + verify(depthController, never()).transitionToFullShadeProgress + } + @Test fun setDragDownAmount_setsValueOnMediaHierarchyManager() { transitionController.dragDownAmount = 10f