summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-05-14 14:09:43 -0700
committerEric Laurent <elaurent@google.com>2012-05-14 14:13:10 -0700
commit8c78752f2bf786ca3e6f45b9dc6955d3b4bba59c (patch)
tree4f0a7b7b2928897f452c4357c4ce53b98e4b7d18 /media
parent2411c3361eb2c15b09a8bfadf5c7c4a3de092ea0 (diff)
downloadframeworks_base-8c78752f2bf786ca3e6f45b9dc6955d3b4bba59c.zip
frameworks_base-8c78752f2bf786ca3e6f45b9dc6955d3b4bba59c.tar.gz
frameworks_base-8c78752f2bf786ca3e6f45b9dc6955d3b4bba59c.tar.bz2
Implement new volume display policy.
Whenever a stream type is muted, the progress bar in volume panel is at 0. If a stream is muted by ringer mode and does not control ringer mode, the progress bar is disabled. Pressing VOL- when in vibrate or silent mode resets the last audible volume of ringtone stream (music strem on tablets) to 0. VolumePanel implementation: - Always prefer AudioManager APIs over AudioService APIs when available on both. - Do not use AudioManager.shouldVibrate() (deprecated). Change-Id: I57fcb19ada4e8d729b6b41d668496562ebe340c3
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/AudioService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 8015203..8da7d0f 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -701,6 +701,10 @@ public class AudioService extends IAudioService.Stub implements OnFinished {
// 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(aliasIndex, direction, step);
+ if ((streamTypeAlias == getMasterStreamType()) &&
+ (mRingerMode == AudioManager.RINGER_MODE_SILENT)) {
+ streamState.setLastAudibleIndex(0, device);
+ }
}
// If stream is muted, adjust last audible index only