Skip to content
Snippets Groups Projects
Commit 44aef3ba authored by LuK1337's avatar LuK1337 Committed by Mohammad Hasan Keramat J
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 3746a63f
No related branches found
No related tags found
No related merge requests found
......@@ -1578,7 +1578,7 @@ public class VolumeDialogImpl implements VolumeDialog,
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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment