diff options
| author | 2012-02-15 17:21:37 -0800 | |
|---|---|---|
| committer | 2012-02-15 17:21:37 -0800 | |
| commit | 98ad9b9d6fd34aad487933170f50b5519313df61 (patch) | |
| tree | 1e1f78180883cc302c562092e027a3f405251af1 | |
| parent | 870084d26d72a9a58c665349dde3ce511dd28466 (diff) | |
Fix music volume regression on tablets
A regression was introduced by the change enabling per device volume:
music volume will not be completely silenced even if volume is shown at 0.
The problem is that when media volume goes to zero, silent mode is entered and
AudioService sends one message per stream/per connected device to the audiosystem
handler to mute volume on each stream. As those messages were sent with the
SENDMSG_NOOP attribute, some of them where lost.
Change-Id: Ic665b1e9dcaf09506a4ec19bf3fe6997d4b071fd
| -rw-r--r-- | media/java/android/media/AudioService.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index eae03beae6fc..1c7f57750d02 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -591,7 +591,7 @@ public class AudioService extends IAudioService.Stub { // Post a persist volume msg sendMsg(mAudioHandler, MSG_PERSIST_VOLUME, - SENDMSG_REPLACE, + SENDMSG_QUEUE, PERSIST_LAST_AUDIBLE, device, s, @@ -606,7 +606,7 @@ public class AudioService extends IAudioService.Stub { // to persist). Do not change volume if stream is muted. sendMsg(mAudioHandler, MSG_SET_DEVICE_VOLUME, - SENDMSG_NOOP, + SENDMSG_QUEUE, device, 0, streamState, @@ -746,7 +746,7 @@ public class AudioService extends IAudioService.Stub { // Post a persist volume msg sendMsg(mAudioHandler, MSG_PERSIST_VOLUME, - SENDMSG_REPLACE, + SENDMSG_QUEUE, PERSIST_LAST_AUDIBLE, device, streamState, @@ -758,7 +758,7 @@ public class AudioService extends IAudioService.Stub { // to persist). sendMsg(mAudioHandler, MSG_SET_DEVICE_VOLUME, - SENDMSG_NOOP, + SENDMSG_QUEUE, device, 0, streamState, @@ -2208,7 +2208,7 @@ public class AudioService extends IAudioService.Stub { } sendMsg(mAudioHandler, MSG_SET_ALL_VOLUMES, - SENDMSG_NOOP, + SENDMSG_QUEUE, 0, 0, VolumeStreamState.this, 0); @@ -2252,7 +2252,7 @@ public class AudioService extends IAudioService.Stub { } sendMsg(mAudioHandler, MSG_SET_ALL_VOLUMES, - SENDMSG_NOOP, + SENDMSG_QUEUE, 0, 0, VolumeStreamState.this, 0); @@ -2350,7 +2350,7 @@ public class AudioService extends IAudioService.Stub { // Post a persist volume msg sendMsg(mAudioHandler, MSG_PERSIST_VOLUME, - SENDMSG_REPLACE, + SENDMSG_QUEUE, PERSIST_CURRENT|PERSIST_LAST_AUDIBLE, device, streamState, |