Add null check in InputManagerService#verifyInputEvent

Using a null event can cause the system to crash.

Bug: 197961435
Fixes: 201720518
Test: Presubmit
Change-Id: Ibf4b44dbedc3b041f6e38362b862f1ab0f665726
(cherry picked from commit 38e3e2b6f6)
This commit is contained in:
Prabir Pradhan
2021-09-03 04:31:30 -07:00
parent 2160b3d75f
commit 1416a9c466

View File

@@ -900,6 +900,7 @@ public class InputManagerService extends IInputManager.Stub
@Override // Binder call
public VerifiedInputEvent verifyInputEvent(InputEvent event) {
Objects.requireNonNull(event, "event must not be null");
return nativeVerifyInputEvent(mPtr, event);
}