Merge "Do not let QS handle touches where clipped." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ba10bacbce
@@ -23,6 +23,7 @@ import android.content.res.Configuration;
|
||||
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 @@ public class QSContainerImpl extends FrameLayout implements Dumpable {
|
||||
}
|
||||
}
|
||||
|
||||
@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) {
|
||||
|
||||
Reference in New Issue
Block a user