Fix incorrect repeatCount sent to app when injecting repeat event

When the injected repeat event occurs after the repeat event synthesized
by the InputDispatcher, the repeatCount of the event sent to the app is
incorrect. For example, the repeatCount sequence of the event received
by the app might be 0,1,2,1,2,3,4,....

Test: atest inputflinger_tests
Change-Id: I13574a77896583bb0062bab17395d27585315e6b
2 files changed