diff options
| author | 2011-08-17 14:59:58 -0700 | |
|---|---|---|
| committer | 2011-08-17 14:59:58 -0700 | |
| commit | 8f6684144a617982763db3d2281e86f2a9d368db (patch) | |
| tree | c185c7d93dc8cb3540fc1cc08e60c6863afb600d | |
| parent | 453091b2fdb9d0273fa75c45358d6d51b0893a2a (diff) | |
| parent | cc11b1b8bb47aa6be23ff5c4caf683ff90074121 (diff) | |
Merge "Fix issue 5126270: Holding volume down vibrates"
| -rw-r--r-- | media/java/android/media/AudioService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index 179b8a45ad60..d4ab9277cb77 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -521,6 +521,10 @@ public class AudioService extends IAudioService.Stub { (!mVoiceCapable && streamType != AudioSystem.STREAM_VOICE_CALL && streamType != AudioSystem.STREAM_BLUETOOTH_SCO) || (mVoiceCapable && streamType == AudioSystem.STREAM_RING)) { + // do not vibrate if already in silent mode + if (mRingerMode != AudioManager.RINGER_MODE_NORMAL) { + flags &= ~AudioManager.FLAG_VIBRATE; + } // Check if the ringer mode changes with this volume adjustment. If // it does, it will handle adjusting the volume, so we won't below adjustVolume = checkForRingerModeChange(oldIndex, direction); |