LockPatternView: set gesture exclusion on layout

- Otherwise, system gesture might be able to override the
  LockPatternView, causing MotionEvent to be pilfer-ed.

Test: http://shortn/_DlKHNocpVF
Bug: 290878374
Change-Id: I29901066c149fde434c8f91456e9d2e62d0a05e0
This commit is contained in:
Yifei Zhang
2023-07-18 18:31:22 -07:00
parent 7e8d39e077
commit 5564752406

View File

@@ -1565,6 +1565,13 @@ public class LockPatternView extends View {
mInStealthMode = ss.isInStealthMode();
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
setSystemGestureExclusionRects(List.of(new Rect(left, top, right, bottom)));
}
/**
* The parecelable for saving and restoring a lock pattern view.
*/