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)
commit7a02a5fc728da9f6b72a0243eded689ec1ea0402
tree4abdb65a2bfe15e9d6d734f1555080852699cccf
parentfbdba95b63fc9bc2616fcfeef60ac1ba1349eecb
Volume: Enable "Volume mute" key on HSW

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