Merge "Turn vibrator off explicitly on waveforms when amplitude is zero"

This commit is contained in:
Treehugger Robot
2020-12-02 17:59:09 +00:00
committed by Gerrit Code Review

View File

@@ -1662,6 +1662,10 @@ public class VibratorService extends IVibratorService.Stub
// Vibrator is already ON, so just change its amplitude. // Vibrator is already ON, so just change its amplitude.
doVibratorSetAmplitude(amplitude); doVibratorSetAmplitude(amplitude);
} }
} else {
// Previous vibration should have already finished, but we make sure
// the vibrator will be off for the next step when amplitude is 0.
doVibratorOff();
} }
// We wait until the time this waveform step was supposed to end, // We wait until the time this waveform step was supposed to end,