Do not let QS handle touches where clipped.
Fixes: 196002042
Fixes: 199657455
Bug: 193350347
Bug: 188249360
Test: tap the status bar; unable to trigger any QS tile
Test: drag the QS open by a few mm; unable to trigger any QS tile
Test: open shade, scroll notifications to partially obscure a QS tile; tile is pressable down to the clip, but when clicking below the clip, the default "collapse shade" behavior kicks in.
Test: expand QS with 2 fingers; opens fully expanded QS
Test: fingerprint unlock; expand shade with 1 finger; occasionally opens fully expanded shade: b/193350347
Merged-In: Ie264ee69570f72f5653b423a8649663e3aab1df9
Change-Id: Ie264ee69570f72f5653b423a8649663e3aab1df9
(cherry picked from commit dab0ff498b1a281aac5abc2c986c4471d43ea555)
(cherry picked from commit 705574bfc4f24cde47762340e177d5c7424cb399)
Merged-In:Ie264ee69570f72f5653b423a8649663e3aab1df9
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
index 59e5eb8..6f12e46 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
@@ -23,6 +23,7 @@
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Point;
+import android.graphics.PointF;
import android.util.AttributeSet;
import android.view.View;
import android.view.WindowInsets;
@@ -289,6 +290,16 @@
}
}
+ @Override
+ protected boolean isTransformedTouchPointInView(float x, float y,
+ View child, PointF outLocalPoint) {
+ // Prevent touches outside the clipped area from propagating to a child in that area.
+ if (mClippingEnabled && y + getTranslationY() > mFancyClippingTop) {
+ return false;
+ }
+ return super.isTransformedTouchPointInView(x, y, child, outLocalPoint);
+ }
+
private void updateClippingPath() {
mFancyClippingPath.reset();
if (!mClippingEnabled) {