OSDN Git Service

audio service: add config option for fixed volume
authorEric Laurent <elaurent@google.com>
Wed, 20 Mar 2013 01:15:31 +0000 (18:15 -0700)
committerEric Laurent <elaurent@google.com>
Fri, 22 Mar 2013 01:43:00 +0000 (18:43 -0700)
commit83a017b6b7c099d1a0293e5839be6477325aef06
tree7ecdcd95f23900c35f2dc551bbb1690a6bf748db
parente37478c4ebbe6e95ef3904b9f2fa0e93e1b258ac
audio service: add config option for fixed volume

Add a boolean configuration option config_useFixedVolume indicating if
stream volumes or master volume can be modified.
If the option is true, the AudioManager volume and mute APIs will be no ops and the
volumes will be maxed out.
To be consistent:
- the ringer mode is forced to normal and cannot be modified
- volume panel is never displayed
- volume settings are not available
- ringer mode global action is not displayed.

The default for this option if false.

This is useful for a class of devices intended for connection to a digital
audio output only, where the volume is directly controlled on the audio sink.

Bug 8161458

Change-Id: I2571d5ee79952ef0914d8fd1985816467a80adcd
core/res/res/values/config.xml
core/res/res/values/symbols.xml
media/java/android/media/AudioService.java
media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/MediaAudioManagerTest.java
policy/src/com/android/internal/policy/impl/GlobalActions.java