summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2020-06-22 09:51:34 -0700
committer Selim Cinek <cinek@google.com> 2020-06-22 09:51:34 -0700
commit5de3baa2ded2792d8a1f53f54fadbd5dd510b0c3 (patch)
tree7bef14ad461d0589225a567464a8f7af437529ff
parent48dc1924998e619460ac4c125c2c1589b77aed4b (diff)
Don't intercept touches when the qs scrollview can't scroll
This could lead to users not being able to collapse. Fixes: 159420191 Test: expand qs, try to collapse from the 3 dot region Change-Id: Iaa19e607919615777e5b21bbbd6325b6794b710a
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/NonInterceptingScrollView.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/NonInterceptingScrollView.java b/packages/SystemUI/src/com/android/systemui/qs/NonInterceptingScrollView.java
index aa17c4aa79b1..309b32fc85d2 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/NonInterceptingScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/NonInterceptingScrollView.java
@@ -46,6 +46,11 @@ public class NonInterceptingScrollView extends ScrollView {
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(true);
}
+ } else if (!canScrollVertically(-1)) {
+ // Don't pass on the touch to the view, because scrolling will unconditionally
+ // disallow interception even if we can't scroll.
+ // if a user can't scroll at all, we should never listen to the touch.
+ return false;
}
break;
}