diff options
| author | 2020-12-02 18:37:27 +0000 | |
|---|---|---|
| committer | 2020-12-02 18:37:27 +0000 | |
| commit | 831f02d294517e11cb79051fe09734b520cc98ec (patch) | |
| tree | 071bfdce9d7ff6cfdd403d904c451ab0f22a3013 | |
| parent | 3a435016f4d71bba430421507ff4070421d35023 (diff) | |
| parent | 240fe528117c4a07399baa8010d0f98807b62782 (diff) | |
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
| -rw-r--r-- | services/core/java/com/android/server/VibratorService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/VibratorService.java b/services/core/java/com/android/server/VibratorService.java index 0ee30f9ca289..9340be10060c 100644 --- a/services/core/java/com/android/server/VibratorService.java +++ b/services/core/java/com/android/server/VibratorService.java @@ -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, |