diff options
| author | 2024-06-17 17:21:52 +0000 | |
|---|---|---|
| committer | 2024-06-17 17:21:52 +0000 | |
| commit | d4ce46b16d58aaaa91853d2c29f7c8f71b5b858d (patch) | |
| tree | 49faf7fc2280740b3f66339b46f5929507b5e615 | |
| parent | d72a0b499c41fc3f7e35947b8d89be6d0f4ce96a (diff) | |
| parent | 158a1189ac6dc35ef6a6e1c5945bc794789560f6 (diff) | |
Merge "[Flexiglass] format notification files" into main
3 files changed, 5 insertions, 4 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt index a2426a6acff2..29223ce03b97 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt @@ -417,10 +417,7 @@ fun NotificationStackCutoffGuideline( ) { Spacer( modifier = - modifier - .fillMaxWidth() - .height(0.dp) - .onGloballyPositioned { coordinates -> + modifier.fillMaxWidth().height(0.dp).onGloballyPositioned { coordinates -> val positionY = coordinates.positionInWindow().y debugLog(viewModel) { "STACK cutoff onGloballyPositioned: y=$positionY" } stackScrollView.setStackCutoff(positionY) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt index a693dd7e5249..bffc1704cdb4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt @@ -70,9 +70,11 @@ class ScrollViewFields { /** send the [syntheticScroll] to the [syntheticScrollConsumer], if present. */ fun sendSyntheticScroll(syntheticScroll: Float) = syntheticScrollConsumer?.accept(syntheticScroll) + /** send [isCurrentGestureOverscroll] to the [currentGestureOverscrollConsumer], if present. */ fun sendCurrentGestureOverscroll(isCurrentGestureOverscroll: Boolean) = currentGestureOverscrollConsumer?.accept(isCurrentGestureOverscroll) + /** send the [headsUpHeight] to the [headsUpHeightConsumer], if present. */ fun sendHeadsUpHeight(headsUpHeight: Float) = headsUpHeightConsumer?.accept(headsUpHeight) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt index 8d1a09605d55..762c507220fa 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt @@ -64,8 +64,10 @@ interface NotificationScrollView { /** Set a consumer for synthetic scroll events */ fun setSyntheticScrollConsumer(consumer: Consumer<Float>?) + /** Set a consumer for current gesture overscroll events */ fun setCurrentGestureOverscrollConsumer(consumer: Consumer<Boolean>?) + /** Set a consumer for heads up height changed events */ fun setHeadsUpHeightConsumer(consumer: Consumer<Float>?) |