Loading packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt +28 −17 Original line number Diff line number Diff line Loading @@ -531,12 +531,20 @@ fun ContentScope.NotificationScrollingStack( } val scrimNestedScrollConnection = shadeSession.rememberSession(key = "ScrimConnection", scrimOffset, minScrimTop, density) { if (supportNestedScrolling) { shadeSession.rememberSession( key = "ScrimConnection", scrimOffset, minScrimTop, density, ) { val flingSpec: DecayAnimationSpec<Float> = splineBasedDecay(density) val flingBehavior = NotificationScrimFlingBehavior(flingSpec) NotificationScrimNestedScrollConnection( scrimOffset = { scrimOffset.value }, snapScrimOffset = { value -> coroutineScope.launch { scrimOffset.snapTo(value) } }, snapScrimOffset = { value -> coroutineScope.launch { scrimOffset.snapTo(value) } }, animateScrimOffset = { value -> coroutineScope.launch { scrimOffset.animateTo(value) } }, Loading @@ -547,6 +555,9 @@ fun ContentScope.NotificationScrollingStack( flingBehavior = flingBehavior, ) } } else { null } val swipeToExpandNotificationScrollConnection = shadeSession.rememberSession( Loading Loading @@ -715,8 +726,8 @@ fun ContentScope.NotificationScrollingStack( modifier = Modifier.disableSwipesWhenScrolling() .nestedScroll(swipeToExpandNotificationScrollConnection) .thenIf(supportNestedScrolling) { Modifier.nestedScroll(scrimNestedScrollConnection) .thenIf(supportNestedScrolling && scrimNestedScrollConnection != null) { Modifier.nestedScroll(scrimNestedScrollConnection!!) } .verticalScroll(scrollState, overscrollEffect = overScrollEffect) .fillMaxWidth() Loading packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt +2 −1 Original line number Diff line number Diff line Loading @@ -387,6 +387,7 @@ private fun ContentScope.QuickSettingsContent( .padding(horizontal = shadeHorizontalPadding), ) // TODO(b/436646848): remove NotificationScrollingStack from QuickSettings // 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 Loading @@ -406,7 +407,7 @@ private fun ContentScope.QuickSettingsContent( stackTopPadding = notificationStackPadding, stackBottomPadding = navBarBottomHeight, shouldIncludeHeadsUpSpace = false, supportNestedScrolling = true, supportNestedScrolling = false, modifier = Modifier.fillMaxWidth() // Match the screen height with the scrim, so it covers the whole screen, Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt +28 −17 Original line number Diff line number Diff line Loading @@ -531,12 +531,20 @@ fun ContentScope.NotificationScrollingStack( } val scrimNestedScrollConnection = shadeSession.rememberSession(key = "ScrimConnection", scrimOffset, minScrimTop, density) { if (supportNestedScrolling) { shadeSession.rememberSession( key = "ScrimConnection", scrimOffset, minScrimTop, density, ) { val flingSpec: DecayAnimationSpec<Float> = splineBasedDecay(density) val flingBehavior = NotificationScrimFlingBehavior(flingSpec) NotificationScrimNestedScrollConnection( scrimOffset = { scrimOffset.value }, snapScrimOffset = { value -> coroutineScope.launch { scrimOffset.snapTo(value) } }, snapScrimOffset = { value -> coroutineScope.launch { scrimOffset.snapTo(value) } }, animateScrimOffset = { value -> coroutineScope.launch { scrimOffset.animateTo(value) } }, Loading @@ -547,6 +555,9 @@ fun ContentScope.NotificationScrollingStack( flingBehavior = flingBehavior, ) } } else { null } val swipeToExpandNotificationScrollConnection = shadeSession.rememberSession( Loading Loading @@ -715,8 +726,8 @@ fun ContentScope.NotificationScrollingStack( modifier = Modifier.disableSwipesWhenScrolling() .nestedScroll(swipeToExpandNotificationScrollConnection) .thenIf(supportNestedScrolling) { Modifier.nestedScroll(scrimNestedScrollConnection) .thenIf(supportNestedScrolling && scrimNestedScrollConnection != null) { Modifier.nestedScroll(scrimNestedScrollConnection!!) } .verticalScroll(scrollState, overscrollEffect = overScrollEffect) .fillMaxWidth() Loading
packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt +2 −1 Original line number Diff line number Diff line Loading @@ -387,6 +387,7 @@ private fun ContentScope.QuickSettingsContent( .padding(horizontal = shadeHorizontalPadding), ) // TODO(b/436646848): remove NotificationScrollingStack from QuickSettings // 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 Loading @@ -406,7 +407,7 @@ private fun ContentScope.QuickSettingsContent( stackTopPadding = notificationStackPadding, stackBottomPadding = navBarBottomHeight, shouldIncludeHeadsUpSpace = false, supportNestedScrolling = true, supportNestedScrolling = false, modifier = Modifier.fillMaxWidth() // Match the screen height with the scrim, so it covers the whole screen, Loading