Make the ability to change the audio mode conditional to having
the MODIFY_PHONE_STATE permission.
Make AudioService's internal implementation of the mode setting
(the setModeInt() method) private, it is only meant to be used
by AudioService.
Refer to the permission names through Manifest.permission, not
by their string value.
Bug 14964198
Change-Id: I49870207566e53d5c8764646cece06d8272f93ed
Some legacy apps register a RemoteController on a thread without a
looper. This ensures a handler with a looper is used when it registers
the sessions listener.
bug:17357029
Change-Id: Ia3d98f5dcc331edd0c3a7e858db1d9e7e2749e14
Added currentVolume to constructor.
Removed onGetCurrentVolume and notifyVolume changed.
Added setCurrentVolume and getCurrentVolume.
Updated javadoc to make it clear how they're used.
bug:17258168
Change-Id: I24388aab38824b101ccc18810caa09d46aa7afe0
This allows empty strings to be passed to playFromSearch to indicate
something should be chosen for the user and played. This makes it
consistent with INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH.
bug:17316566
Change-Id: I00ce8d252efa940e05568629e35198450c224a92
Forgot to update the comment to specify that notification listeners
may also get a MediaController from the manager.
Change-Id: Id38bcf7cb38185bfe4f99bcf8889a6415320dd36
The implementation for AudioManager.setMicrophoneMute() used to
call directly into AudioSystem which called directly into
AudioFlinger and the mediaserver process, where the check for
the MODIFY_AUDIO_SETTINGS is performed.
A regression was introduced by Ib32138bcc256cfbac4fe21a090d5ba34f5c641fc
which calls first into AudioService which runs in system_process
before calling into AudioSystem, which granted the permission.
This CL adds a permission check in this code path when calling
AudioService.
Bug 17259652
Change-Id: I4ac5269262eb90df80ee81db6ec3d96977ee53be
It is not that Singapore has two different rating systems. There is just one
rating system from Board of Film Censors but each broadcaster uses a different
subset of ratings. For example, Free-To-Air uses PG and PG13 while Pay TV uses
NC16 and M18 ratings in addition to the PG and PG13.
Bug: 17330613
Change-Id: I5a5e47706e7415f13a5e7dc9c00cc2c3c3763965
AV devices including TV have more fine-grained volume control
for media type (audio and video). But audio service allows
only 15 steps for music type.
This change mimics voice calls approach to make music type
volume configurable.
Bug: 17342612
Change-Id: Ic82ff4d74b29963edfe92975000df07244492ae6
For ACTION_HEADSET_PLUG (already in SDK):
- duplicated definition in AudioManager and moved
javadoc there. Javadoc in Intent points to AudioManager.
- the String value is not changed
For ACTION_HDMI_AUDIO_PLUG (being added in SDK):
- moved defintion from Intent to AudioManager
- updated String value to reflect package name "android.media"
instead of using "android.intent"
- added definition of the extras, but removed "name".
For ACTION_ANALOG_AUDIO_DOCK_PLUG,
ACTION_DIGITAL_AUDIO_DOCK_PLUG,
ACTION_USB_AUDIO_ACCESSORY_PLUG,
ACTION_USB_AUDIO_DEVICE_PLUG, all hidden:
- moved definition from Intent to AudioManager,
- changed the value from "android.intent.*" to "android.media.*"
Updated AudioService, UsbDeviceManager and UsbHostManager
to refer to the actions in AudioManager, not Intent.
Bug 17289385
Change-Id: I61dd73140022d2bb9a676a57f595092c8fa89dcc
Since we converted MediaDescription over to using a String media id
for identifying everything we should also use Strings in the browser
service to make it clear that it should re-use that field.
bug:17333205
Change-Id: I5fd5762bdad05068f5b1aa36074306b43432e686