Add null check for input view.

Add a null check here to prevent NPE.

Fixes: 283621786
Test: drag around pattern view.
Change-Id: I3f71a9747f1c6c7c09225b0b72f6ba5652000d1a
This commit is contained in:
Aaron Liu
2023-06-15 11:20:38 -07:00
parent 84647eb97b
commit cefa4d989d

View File

@@ -474,7 +474,8 @@ public class KeyguardSecurityContainer extends ConstraintLayout {
return false;
}
// Avoid dragging the pattern view
if (mSecurityViewFlipper.getSecurityView().disallowInterceptTouch(event)) {
if (mSecurityViewFlipper.getSecurityView() != null
&& mSecurityViewFlipper.getSecurityView().disallowInterceptTouch(event)) {
return false;
}
int index = event.findPointerIndex(mActivePointerId);