input_verifier: Ensure bad event does not change verifier state

Before this CL, the verifier combined a check and a storage operation
into a single action. After the check, a bad event would cause the
verifier to return, but the state would have already be altered.

In this CL, we ensure that the check happens first, so that a bad event
does not modify the verifier state.

Bug: 287342122
Test: atest inputflinger_tests
Change-Id: Ib981231046faa062717a9d00856bf9551e510a33
1 file changed