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

Unverified Commit 7fed7d51 authored by LuK1337's avatar LuK1337 Committed by Michael Bestas
Browse files

VolumeDialogImpl: Don't vibrate when volume dialog is not visible

We shouldn't be playing volume dialog specific haptic feedback
when the dialog is not visible.

Test: Call am.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE)
      from external application, observe that there's no vibration.
Change-Id: I10ad1e0259092c2297d96f083161395275467781
parent f0b33842
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1882,7 +1882,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,

    protected void onStateChangedH(State state) {
        if (D.BUG) Log.d(TAG, "onStateChangedH() state: " + state.toString());
        if (mState != null && state != null
        if (mShowing && mState != null && state != null
                && mState.ringerModeInternal != -1
                && mState.ringerModeInternal != state.ringerModeInternal
                && state.ringerModeInternal == AudioManager.RINGER_MODE_VIBRATE) {