Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96c18962 authored by Lais Andrade's avatar Lais Andrade
Browse files

Turn vibrator off explicitly on waveforms when amplitude is zero

This makes sure the drive will be off for the period of time described in the waveform pattern with amplitude = 0.

Bug: 172492945
Test: manual
Change-Id: I604fea474b6b0b56ee6d16cacb4c4fc97cb7516a
Merged-In: I753e4846fce3066b78e818afa5c794b113244ab0
parent 0836d630
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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,