Merge "Turn vibrator off explicitly on waveforms when amplitude is zero" am: 240fe52811

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1501672

Change-Id: Icd9bae7e30da84db335a5d490d26e5cd504e3be0
This commit is contained in:
Treehugger Robot
2020-12-02 18:37:27 +00:00
committed by Automerger Merge Worker

View File

@@ -1662,6 +1662,10 @@ public class VibratorService extends IVibratorService.Stub
// Vibrator is already ON, so just change its 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,