Fix VibratorService waveform accumulated delay

Change VibrateWaveformThread logic around delays while playing a
waveform to amortize processing/scheduling delays into the sleep part of
the thread. This should make the actual waveform duration closer to the
requested one.

Bug: 171133221
Test: manually check waveform vibration durations with dumpsys
Change-Id: I0ac88baf4127e9aebe56041a3a334ef8a2f8d43d
Merged-In: Iafe7f031444f68cd2cdc16883812874f385cba8e
1 file changed