diff options
| author | 2024-01-02 21:13:17 +0000 | |
|---|---|---|
| committer | 2024-01-02 21:13:17 +0000 | |
| commit | d8d55408de1f5da399c85dec69e58e09d93de978 (patch) | |
| tree | 379e27774698ba7c8e047cb0c1f3ecffdb158c61 | |
| parent | 1177e9dd37427adf8d47d81a516d0524c6603eb5 (diff) | |
| parent | 2169737d2f4e464e01cfc0858d09c4c5d5076b67 (diff) | |
Merge "Fix issues when opening glanceable hub slowly" into main
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt b/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt index ab69acbc6e9d..3be60b74af21 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt @@ -157,7 +157,10 @@ constructor( // If the hub is fully visible, send all touch events to it. val communalVisible = hubShowing && !hubOccluded if (communalVisible) { - return communalContainerView.dispatchTouchEvent(ev) + communalContainerView.dispatchTouchEvent(ev) + // Return true regardless of dispatch result as some touches at the start of a gesture + // may return false from dispatchTouchEvent. + return true } if (edgeSwipeRegionWidth == 0) { @@ -172,13 +175,19 @@ constructor( x >= communalContainerView.width - edgeSwipeRegionWidth if (inOpeningSwipeRegion && !hubOccluded) { isTrackingOpenGesture = true - return communalContainerView.dispatchTouchEvent(ev) + communalContainerView.dispatchTouchEvent(ev) + // Return true regardless of dispatch result as some touches at the start of a + // gesture may return false from dispatchTouchEvent. + return true } } else if (isTrackingOpenGesture) { if (isUp || isCancel) { isTrackingOpenGesture = false } - return communalContainerView.dispatchTouchEvent(ev) + communalContainerView.dispatchTouchEvent(ev) + // Return true regardless of dispatch result as some touches at the start of a gesture + // may return false from dispatchTouchEvent. + return true } return false |