| commit | 6fbb4ab8f62364bccf8173ff422b3e7626b0b606 | [log] [tgz] |
|---|---|---|
| author | William Xiao <wxyz@google.com> | Thu Sep 26 17:00:32 2024 -0700 |
| committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Oct 02 23:21:48 2024 +0000 |
| tree | a15146357cff4151ba66023d45a141dc5b967277 | |
| parent | 8085985adff0e9a0168256192e3053296598611f [diff] |
Fix top and bottom swipes not working after touches on glanceable hub The bouncer and shade touch handlers coordinate carefully with the hub's touch handling to allow for vertical swipes on the grid itself, as long the hub iself is not consuming the touch. The hub relied on the touch handlers to reset the nested scrolling state between touches. However, if the touch is entirely consumed by the hub, such as when tapping on a CTA tile button, scrolling on a widget has a list, or moving the UMO, the touch state is not reset. This leads to gestures that are not nested scrolls, such as swiping up from the very bottom for bouncer or very top for shade to not work. This CL resets the touch scroll state when a touch consumed by the hub ends to fix these issues. Bug: 368420327 Fixed: 368420327 Flag: com.android.systemui.communal_hub Test: manually verified on device (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:20b553d64084aa36703ee4b2f922debd4fc591a9) Merged-In: Ide4e6812b7e60e5301f4e3c2d668fb337ffce86c Change-Id: Ide4e6812b7e60e5301f4e3c2d668fb337ffce86c
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt index 3b09151..bcd3337 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt
@@ -310,6 +310,9 @@ it.changedToUp() || it.changedToUpIgnoreConsumed() } ) + + // Reset state once touch ends. + viewModel.onResetTouchState() } } }