Add null check in InputManagerService#verifyInputEvent

Using a null event can cause the system to crash.

Bug: 197961435
Test: Presubmit
Change-Id: Ibf4b44dbedc3b041f6e38362b862f1ab0f665726
This commit is contained in:
Prabir Pradhan
2021-09-03 04:31:30 -07:00
parent 54cf50c504
commit 38e3e2b6f6

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);
}