diff options
| author | 2024-10-03 13:53:22 -0700 | |
|---|---|---|
| committer | 2024-10-03 13:53:22 -0700 | |
| commit | 964a749d5d55438e43861ca25f1eff7881c1b64c (patch) | |
| tree | 6a3bff38f1fcf1a5c14e3c65eb6eaae094737404 | |
| parent | 686efe65c7f7e1117ce324671f2e87c4c033b892 (diff) | |
[flexiglass] Moves NSSL an additional px down in QS scene
This fixes the swipe up from the bottom edge that collapses QS back to
gone or lockscreen so that it works again (instead of scrolling NSSL
up).
Bug: 370877754
Test: manually verified that dragging up from the bottom of the display
while on QS correctly closes back to LS or Gone scene
Flag: com.android.systemui.scene_container
Change-Id: I797a476f78df5260c8bd3e5abd685caff7b71d42
| -rw-r--r-- | packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt index 630497998c3e..f9f91d27218c 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt @@ -420,17 +420,26 @@ private fun SceneScope.QuickSettingsScene( .navigationBarsPadding() .padding(horizontal = shadeHorizontalPadding), ) + + // The minimum possible value for the top of the notification stack. In other words: how + // high is the notification stack allowed to get when the scene is at rest. It may still be + // translated farther upwards by a transition animation but, at rest, the top edge of its + // bounds must be limited to be at or below this value. + // + // A 1 pixel is added to compensate for any kind of rounding errors to make sure 100% that + // the notification stack is entirely "below" the entire screen. + val minNotificationStackTop = screenHeight.roundToInt() + 1 NotificationScrollingStack( shadeSession = shadeSession, stackScrollView = notificationStackScrollView, viewModel = notificationsPlaceholderViewModel, - maxScrimTop = { screenHeight }, + maxScrimTop = { minNotificationStackTop.toFloat() }, shouldPunchHoleBehindScrim = shouldPunchHoleBehindScrim, shouldIncludeHeadsUpSpace = false, shadeMode = ShadeMode.Single, modifier = Modifier.fillMaxWidth() - .offset { IntOffset(x = 0, y = screenHeight.roundToInt()) } + .offset { IntOffset(x = 0, y = minNotificationStackTop) } .padding(horizontal = shadeHorizontalPadding), ) NotificationStackCutoffGuideline( @@ -439,7 +448,7 @@ private fun SceneScope.QuickSettingsScene( modifier = Modifier.align(Alignment.BottomCenter) .navigationBarsPadding() - .offset { IntOffset(x = 0, y = screenHeight.roundToInt()) } + .offset { IntOffset(x = 0, y = minNotificationStackTop) } .padding(horizontal = shadeHorizontalPadding), ) } |