Fix concurrency of IVibratorCallback

Fix error when VibrationThread gets a callback from a previous vibrate
request after turning the vibrator off and on again.

This can be triggered by playing a repeating waveform with a very short
off step, for example with timings [10, 1000, 10, 1000]. One of the 1s
ON steps will be played with the vibrator off because the thread will
get the callback from a previous on() call after the vibrator was turned
off and on again.

Test: atest com.android.server.vibrator
Fix: 290585608
Change-Id: Ib790059704fdb86b2813e2c3d155cf71934cad05
Flag: NONE normal/day-to-day bugfix
2 files changed