From 5421eb693ef5fa0d13283ee6c2805e4d7901c7bf Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Wed, 10 Jun 2020 18:24:56 -0400 Subject: [PATCH] Fix manage not being dismissed by taps in the AV bounds. This actually isn't a touchable region issue - the expanded view steals touches from the stack if they're within the AV's vertical bounds so that back swipes across the side padding aren't intercepted by the stack, causing it to collapse. We should be checking the x coordinate as well, since the stack *should* be able to intercept touches from the AV itself. Fixes: 158674822 Test: manual Change-Id: Ieb12e6d97a0c180139bcaa1634e0ce47899d7c72 --- .../src/com/android/systemui/bubbles/BubbleExpandedView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java index 2fd4d2aaf1d7a..69de1e7df0d74 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java @@ -351,7 +351,10 @@ public class BubbleExpandedView extends LinearLayout { // ActivityView's vertical bounds. These events are part of a back gesture, and so they // should not collapse the stack (which all other touches on areas around the AV would // do). - if (motionEvent.getRawY() >= avBounds.top && motionEvent.getRawY() <= avBounds.bottom) { + if (motionEvent.getRawY() >= avBounds.top + && motionEvent.getRawY() <= avBounds.bottom + && (motionEvent.getRawX() < avBounds.left + || motionEvent.getRawX() > avBounds.right)) { return true; }