From 158a1189ac6dc35ef6a6e1c5945bc794789560f6 Mon Sep 17 00:00:00 2001 From: AndrĂ¡s Kurucz Date: Mon, 17 Jun 2024 15:07:38 +0000 Subject: [Flexiglass] format notification files Refactor Notification Flexiglass files after a ktfmt update. Bug: 332574413 Flag: NONE formatting only Test: build sysui Change-Id: Ie5e595d01d7e17d530c633087e93484a09e05c44 --- .../android/systemui/notifications/ui/composable/Notifications.kt | 5 +---- .../systemui/statusbar/notification/stack/ScrollViewFields.kt | 2 ++ .../statusbar/notification/stack/ui/view/NotificationScrollView.kt | 2 ++ 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?) + /** Set a consumer for current gesture overscroll events */ fun setCurrentGestureOverscrollConsumer(consumer: Consumer?) + /** Set a consumer for heads up height changed events */ fun setHeadsUpHeightConsumer(consumer: Consumer?) -- cgit v1.2.3-59-g8ed1b