OSDN Git Service

Volume: Enable "Volume mute" key on HSW
authorBilly <xiaobing.feng@windriver.com>
Fri, 28 Jun 2013 09:00:07 +0000 (17:00 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 25 Sep 2013 02:52:15 +0000 (10:52 +0800)
Fix:
Android doesn't use master stream by default (config_useMasterVolume=false),
it cause AudioManager doesn't handle VOLUME_MUTE event. Modify AudioManager
to deal with this event, which make "Volume mute" key work.

There are 3 kind of behavior for "Volume mute" key, "Mute master stream",
"Mute activity stream" and "Mute all affected streams". Selecting the
first one as its behavior. The reasons are:

1. Mute activity stream, other streams still work. Once the activity stream
swith out, it is not easy to unmute it for user, and this behavior is different with
other desktop system usage habit, like windows.
2. For "Mute all affected streams", If the streams have different original status, some are
muted, the others are not muted, How can we define the behavior once "Volume mute" key
pressing down, mute the unmuted streams or unmute the muted streams?

Issue: AXIA-2773
Change-Id: I87179ab1ef58ca9973b6f4421039ec492fb417a7
Signed-off-by: Xiaobing Feng <xiaobing.feng@windriver.com>
media/java/android/media/AudioManager.java

index 93ab401..603201e 100644 (file)
@@ -496,7 +496,7 @@ public class AudioManager {
                     if (mUseMasterVolume) {
                         setMasterMute(!isMasterMute());
                     } else {
-                        // TODO: Actually handle MUTE.
+                        setMasterMute(!isMasterMute());
                     }
                 }
                 break;