Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55647524 authored by Yifei Zhang's avatar Yifei Zhang
Browse files

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
parent 7e8d39e0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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.
     */