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
This commit is contained in:
Selim Cinek
2020-06-22 09:51:34 -07:00
parent 48dc192499
commit 5de3baa2de

View File

@@ -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;
}