History log of /frameworks/base/media/java/android/media/IAudioService.aidl
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f04fab160a044e4e7d936c0457a156d7911f924c 19-May-2016 Jean-Michel Trivi <jmtrivi@google.com> Recording activity notification: return list of configuration

Use a list of configurations instead of an array

Bug 28819230

Change-Id: Ia4a3cdabf8337cfb98abe4d0055d497bcab8a5ee
/frameworks/base/media/java/android/media/IAudioService.aidl
598c0c9f659184971e974de6a0184a3000e7900c 07-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Rename AudioRecordConfiguration to AudioRecordingConfiguration

In package android.media:
- rename AudioRecordConfiguration to
AudioRecordingConfiguration to avoid ambiguity with the
android.media.AudioRecord class
- rename AudioManager.getActiveRecordConfigurations() to
getActiveRecordingConfigurations.

Bug 27385560

Change-Id: I5ef404ff36522193990c9b563d4545893529b365
/frameworks/base/media/java/android/media/IAudioService.aidl
431ec6cdb9818ea6fb8b78e2589042ff09c40974 07-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Revert "Rename AudioRecordConfiguration to AudioRecordingConfiguration"

This reverts commit 99278e1c724e01b792dd27031bc579e7d738edc1.

Change-Id: Ifcb3f17a26df8171cbc21dac093477b98a1333db
/frameworks/base/media/java/android/media/IAudioService.aidl
99278e1c724e01b792dd27031bc579e7d738edc1 02-Mar-2016 Jean-Michel Trivi <jmtrivi@google.com> Rename AudioRecordConfiguration to AudioRecordingConfiguration

In package android.media: rename AudioRecordConfiguration to
AudioRecordingConfiguration to avoid ambiguity with the
android.media.AudioRecord class

Bug 27385560

Change-Id: Ia633ac30cbe151b8f0f903dc96a459a56737ace2
/frameworks/base/media/java/android/media/IAudioService.aidl
7b98e9a7e56213f90665c2c9aec213de8557021b 26-Feb-2016 Andy Hung <hunga@google.com> Make master mono controlled through settings

Bug: 15283594
Change-Id: I94a84a3ad3bbb0c1179726a4ecc68b7df033af58
/frameworks/base/media/java/android/media/IAudioService.aidl
de41d3cd5a28cce3ba7f0fa23ba7c41ef93b223d 13-Jan-2016 Jean-Michel Trivi <jmtrivi@google.com> Merge changes from topic 'recordingcallback'

* changes:
Audio recording notification API
AudioManager event dispatcher: make more generic
d3c71f075b139024e2bea39bbd75e3b976bfb7cb 07-Dec-2015 Jean-Michel Trivi <jmtrivi@google.com> Audio recording notification API

AudioService can register a recording callback with AudioSystem.
Callbacks are handled in a new class, RecordingActivityMonitor.
This class notifies registered AudioManager instances
of updates, only if this AudioManager has client callbacks.
Each AudioManager dispatches updates to its registered
callbacks.

Bug 22876530

Change-Id: I95c6e5ec0631e53af53a490bcecca96089490089
/frameworks/base/media/java/android/media/IAudioService.aidl
f04b84d4c66ea377ec6fe2b36f3a0994f3e94eba 19-Dec-2015 Andy Hung <hunga@google.com> Add setMasterMono and getMasterMono

Bug: 15283594
Bug: 22700363
Change-Id: I5d0552938ec2a54be4450512974d92ff8c77b1e9
/frameworks/base/media/java/android/media/IAudioService.aidl
d4de20df2a1e57d22db7c538b197e3db18eaaa7d 04-Nov-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioService: remove dead code

Remove dead code related to media button event receiver and
remote control display, now handled by MediaSession*

Change-Id: I4bd621240ddddf4df079df8d551c72b232c3301d
/frameworks/base/media/java/android/media/IAudioService.aidl
70e0c58c2269cd29dfd6420d690da13dc03fd457 30-Jun-2015 Kenny Guy <kennyguy@google.com> Mute correct user from device policy manager.

Add per user versions of mute methods so
device policy manager can mute the correct
user.
Just persist change if the calling user
isn't the current user.
Treat calls to audio manager coming from uid
1000 as if they were coming from current user
rather than user 0 so that the correct user's
user restriction is checked.

Bug: 21782066
Bug: 21778905
Change-Id: I51469b741096d8a2ffdc520eaf5b3fd754f2c819
/frameworks/base/media/java/android/media/IAudioService.aidl
a38e1f4ed997bea3cbfbf8094a52c23570d59d2a 17-Jun-2015 Dongwon Kang <dwkang@google.com> Make MediaSessionService not blocked by AudioService.

Backgroud: As noted in b/20823981, MediaSessionService calls some
audio service methods while holding a lock and the audio service
methods also talk to other system services. And, deadlock happens when
the other system service fires another request to MediaSessionService
while holding its lock.

Example1) --- resolved by the change in MediaSessionRecord.java
T1: MediaSessionService.dispatchAdjustVolumeLocked()
-> MediaSessionRecord.adjustVolume()
-> +++AudioServiceInternal.adjustSuggestedStreamVolumeForUid()+++
-> AudioService.adjustSuggestedStreamVolume()
-> telecom.TelecomManager.isInCall() --- blocked by lock in TelecomManager.
T2: telecom.ConnectionServiceWrapper.handleCreateConnectionComplete()
-> MediaSession.setActive()
-> MediaSessionRecord$SessionStub.setActive()
-> MediaSessionService.updateSession() --- blocked by lock in MediaSessionService.

Example2) --- resolved by the change in IAudioService.aidl
T1: MediaSessionService.dispatchAdjustVolumeLocked()
-> IAudioService.adjustSuggestedStreamVolume()
-> AudioService.adjustSuggestedStreamVolume()
-> telecom.TelecomManager.isInCall() --- blocked by lock in TelecomManager.
T2: telecom.ConnectionServiceWrapper.handleCreateConnectionComplete()
-> MediaSession.setActive()
-> MediaSessionRecord$SessionStub.setActive()
-> MediaSessionService.updateSession() --- blocked by lock in MediaSessionService.

Here, this change prevents the deadlock by making related audio IPC oneway
and calling the internal audio method without holding the lock.

Bug: 20823981
Change-Id: I4c4b2fc796f23d83be67f7edaacd7496c145d985
/frameworks/base/media/java/android/media/IAudioService.aidl
b6e19e3e0f0170d058636101e23f964196f6f4b2 11-Mar-2015 John Spurlock <jspurlock@google.com> AudioService: Define minimum levels for volume streams.

- Set a floor of 1 for voice call + bluetooth sco, otherwise 0.
- All api calls validated to ensure a floor of the min level.
- Volume UI updated to shift the seekbar by the min value.
- Remove duplicate static max method in AudioService.
- Ensure streams with a min level > 0 are not considered muteable.

Bug: 19260237
Change-Id: I213180c9c277f51bd3897b7f777e5f88ed1db125
/frameworks/base/media/java/android/media/IAudioService.aidl
a48d779dad4c48aa2f97ad021ae3a5649c058312 03-Mar-2015 John Spurlock <jspurlock@google.com> Volume policy updates.

- Make volume policy settable by the volume UI instead
of hardcoded in AudioService.
- Add status bar icon for silent mode.
- Limit unmute-on-volume-adjust behavior to tvs.
- Ensure all changes to device volume are sent through
setIndex so no change events are missed.

Bug: 19260237
Change-Id: Iea070a7a6f90ff620e39629f2da3f33f87223d72
/frameworks/base/media/java/android/media/IAudioService.aidl
9087433753a5068819dcd3e86bdc2cce82bb8040 10-Mar-2015 John Spurlock <jspurlock@google.com> AudioService: Write base stream volume changes to the event log.

- Add a new volume_changed event, reported at the stream level.
- Only include changes to base streams (no aliases).
- Include the caller for each change. A caller is either:
- a pkg name (for external calls or known media sessions)
- a system server class's log tag (for internal calls,
disambiguates "android")

Bug: 19599935
Change-Id: Ia61b68ff1e7e2907a24972790ec052bfe099e665
/frameworks/base/media/java/android/media/IAudioService.aidl
ee5ad729b90deff435f9875337cbc434be4f8fe7 03-Mar-2015 John Spurlock <jspurlock@google.com> Audio: Remove the concept of master volume.

- Remove two config resources (use master volume, and volume ramp).
- Remove master volume adjustments / getters / intents.
- Retain @hidden setMasterMute, needed for device admin
- Remove master volume logic in AudioService.
- Remove master volume logic in VolumePanel.
- Rename "getMasterStreamType" to "getUiSoundsStreamType" to avoid confusion.

Bug: 19582978
Change-Id: Id02c8fa4898cff3b913147f5ac1b4038e2e7cc24
/frameworks/base/media/java/android/media/IAudioService.aidl
a9dfbe8b122d746cf8841fe1b13d31e7e0fc9c52 17-Feb-2015 John Spurlock <jspurlock@google.com> Volume: Allow dialog to query "muteable" streams.

Similar to the existing ability to query streams affected
by ringer mode.

Bug:19260237
Change-Id: I76eb5ab6b7c7e3a4d73ac1909289c560194d4fe8
/frameworks/base/media/java/android/media/IAudioService.aidl
10804eb2818ab59b763a37b4f6151693c2ebba7b 28-Jan-2015 Paul McLean <pmclean@google.com> Add additional info to AudioPort for enum/selection API.

Add "device name" member to AudioPort.
Moved unique device ID from DevicePort to AudioPort.
Straighten out confusion between "name" and "address"
Created string constants for Intent "extra" data keys.
Combine card/address data into "address" at sender.Add additional info to AudioPort for enum/selection API.
Parse out USB Device name in UsbCardsParser.

Change-Id: Ifd76b0298312090a8f39e638339f993b86d47080
/frameworks/base/media/java/android/media/IAudioService.aidl
4197cb60bc74629fe4c04ab10cb3b1c9a7427d24 22-Jan-2015 RoboErik <epastern@google.com> Move mute/unmute handling to adjust volume paths

This deprecates the setStreamMute and setStreamSolo APIs. Soloing is no
longer supported and muting is redirected through the adjust volume APIs.

Also updates the hidden master versions of these APIs.

Change-Id: I65d2a5d5fc15b386bd497abf8ca6869fec75a26a
/frameworks/base/media/java/android/media/IAudioService.aidl
0212be5150fb9fb3c340f3c7e51f6126372cc6f9 24-Nov-2014 Jean-Michel Trivi <jmtrivi@google.com> Support collaborative audio focus handling

Add new flag for an app to define it doesn't duck, but rather
pauses when losing focus with AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK.
This flag is to be used when requesting focus.
Add support for AudioPolicy to specify whether it will implement
ducking itself, rather than it being handled by an app.
When ducking is handled by a policy, do not notify focus owners
when they lose audio focus with LOSS_TRANSIENT_CAN_DUCK, unless
they would have paused, as expressed with the
AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS flag.
Add a focus listener for a policy to be notified of focus changes
so it can properly implement its own ducking.

Bug 16010554

Change-Id: I11d7cdb85c52fd086128a44f4d938aaa44db5c25
/frameworks/base/media/java/android/media/IAudioService.aidl
661f2cf45860d2e10924e6b69966a9afe255f28b 17-Nov-2014 John Spurlock <jspurlock@google.com> VolumeZen: Introduce internal vs external ringer mode.

Stabilize mapping between ringer-mode=silent and zen=priority
by keeping track of two ringer modes:
- Internal ringer mode: Used for underlying stream muting
- External ringer mode: Reported to clients

The mapping between external ringer mode + zen is:
- normal = all
- vibrate = all
- silent = priority (read-write) or none (read)

Changes include:
- Remove "zen check" from audio service, back to audio
service having no knowledge of zen.
- Maintain a new external ringer mode in audio service,
this is the ringer mode reported through AudioManager
to callers, also mapped to the change intent.
- Introduce a "ringer mode delegate" to the local
audio manager interface, responsible for observing
external / internal mode changes, and making changes
if necessary.
- Internal ringer mode changes are still interesting
to the volume dialog, wire up a callback through
the existing IVolumeController interface.
- On devices without vibration, the mapping is the same
but since no ringer mode change is possible, disable
the icon toggle and remove the mute icon when volume=0.
- On devices with vibration, volume down presses should
pulse the vibrate icon (and vibrate) as a hint that this
is as low as the device can go using the keys. Since
the mechanics are similar to the existing zen=none hint,
pull into shared helper.
- Log ringer mode changes to the zen log, include calling
package information for issue diagnosis.
- Include whether vibration is supported in the audio service
dump.
- Update the status bar icon policy to use the internal ringer
mode, not the external mode (for vibrate icon).
- Update the "Muted by <x>" logic, include current suppressor
in dumpsys, ensure suppression icon is enabled & !clickable,
regardless of zen mode.

Bug: 17884168
Bug: 15471679
Bug: 16824970
Change-Id: Ia7d3bb23ce6d1e37b24fb6521d1c1ab9bb8f60c0
/frameworks/base/media/java/android/media/IAudioService.aidl
958876fe55ea0fdeb73c72240a2f2bab32833443 17-Nov-2014 Jean-Michel Trivi <jmtrivi@google.com> Add support for audio focus locking

New API for a registered AudioPolicy to lock/unlock the audio
focus stack and prevent any new grant of focus, similar to
the way phone calls behave.

Bug 16010554

Change-Id: If34a58ca9bd43d5479e94a2a7b540750b4c6efe9
/frameworks/base/media/java/android/media/IAudioService.aidl
fd6ad747e6c268753d0edf7a5a59b6815b190854 10-Nov-2014 Jean-Michel Trivi <jmtrivi@google.com> Support for delayed audio focus

New internal API for an audio focus requester to always enter
the audio focus stack even if audio focus can't be granted
immediately (e.g. during a phone call).
Remap the "no delay" interface to the new "requestAudioFocus"
method signature and AIDL.

Bug 16010554

Change-Id: Iff91ddb0beb411cca1f8cf98300a9afc4178dc7f
/frameworks/base/media/java/android/media/IAudioService.aidl
8fdb0d4defb6ee2ca8057d3442ead36b408b6c17 17-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> More AudioPolicy registration

Define new usage in AudioAttributes to describe "virtual" sources.
Maintain a registration string in AudioPolicy and AudioMix that
is used for the address of the mix in the native policy manager.
AudioPolicy registration marks the audio policy configuration and
the audio mixes as registered.
The AudioPolicy class is used as the factory for the AudioTrack
and AudioRecord objects that are respectively used as the
source and sink of the mixes created by the policy owner.

Bug 16009464

Change-Id: I8e5bd351495257597c513d22597e273fcabdbc55
/frameworks/base/media/java/android/media/IAudioService.aidl
9755937ed90f06db45ff5fe4510950ae1516f8f9 24-Oct-2014 John Spurlock <jspurlock@google.com> AudioService: Restore ringer-mode validation check.

Ensure the ringer-mode is valid when set, and forward client calls
to service method to centralize validation.

Bug: 17884168
Change-Id: I500f9beefbce5b7a8bc01ca9eb7b4a7a16114160
/frameworks/base/media/java/android/media/IAudioService.aidl
e5b42d97f6fd3eb0220ea84f21e60d530d93fc46 15-Oct-2014 John Spurlock <jspurlock@google.com> Leave zen when apps set ringer-mode = non-silent (normal/vibrate).

Apps can end up in priority mode by setting ringer-mode = silent.

Now they can leave priority mode by setting ringer-mode = non-silent.
(normal or vibrate)

Bug: 17884168
Change-Id: I54c853885f4ae9ee618041dd7ac6ab0663fc7b37
/frameworks/base/media/java/android/media/IAudioService.aidl
ba5270b88798c66fefc17a1b25b27894e4fb7862 02-Oct-2014 Jean-Michel Trivi <jmtrivi@google.com> Full volume on remote submix for apps that need it

If an AudioRecord is created with the "fixedVolume" tag
when recording from REMOTE_SUBMIX, treat the
device DEVICE_OUT_REMOTE_SUBMIX as a fixed full volume
device during the recording. Also register a death
handler during the recording.
Otherwise this is a no-op.

Bug 17635294

Change-Id: I8d26fe777047126f34308e1e1b7ac28ba269ad89
/frameworks/base/media/java/android/media/IAudioService.aidl
e7d6d97f0d95b9e8982b0d4d9f5e8ce688291940 04-Sep-2014 Terry Heo <terryheo@google.com> Add a system API to query hdmi system audio mode

Bug: 17383620
Change-Id: I75f11619845e5070190414a2bbe967ba85001472
/frameworks/base/media/java/android/media/IAudioService.aidl
2811dd337262934ea82477f9598f3e49092edb5e 12-Aug-2014 RoboErik <epastern@google.com> Remove REMOTE_STREAM_MUSIC references from AudioService

This removes the fake stream from AudioService and cleans up
references to it. Also removes isLocalOrRemoteMusicActive.

bug:15884752
Change-Id: I1c2b57a2f8ba80061313737f254463f4c80ce8c3
/frameworks/base/media/java/android/media/IAudioService.aidl
12307ca810e8100981b2b60e3f2c6a7e451b9774 15-Jul-2014 Jungshik Jang <jayjang@google.com> Revisit HDMI-CEC system audio mode in AudioService.

From recent feedback on HDMI-CEC system audio mode,
it would be unnecessary to enforce output from AudioService.
Instead, it would follow audio policy according to status
of HDMI-CEC system audio mode.
For that removed two params of setHdmiSystemAudioModeSupported
api of AudioManager.

In terms of speaker mute, it will be handled by removing speaker
from audio ouput instead of changing gain control. For that
added new force usage type, FOR_HDMI_SYSTEM_AUDIO_MODE and
new force config type, FORCE_HDMI_SYSTEM_AUDIO_ENFORCED.
This is used to notify change of system audio mode to
audio policy manager.

Bug: 16305986
Bug: 16002150

Change-Id: I5643ad093a651c951e12b567c6e11b88aa87cea2
/frameworks/base/media/java/android/media/IAudioService.aidl
33f4e04e32fac42f158733d6a731e50490fa9951 11-Jul-2014 John Spurlock <jspurlock@google.com> Volume: Delay adjustments made when showing ringer UI.

Since the volume rocker is now the primary system UI for
entering ringer modes, we need to provide a way to display
the ui without making a sound.

Change the policy for the ringer stream to only display the
UI on the initial adjustment request, don't actually make
an adjustment. However, don't break previous ability to
press and hold the vol keys down to vibrate, so allow this
after the standard framework long-press delay.

Audio service had no way of knowing whether or not the registered
volume controller was visible, so add a mechanism for the
controller (volume panel) to send that info back to the service.

Found and fixed a discrepancy between AudioManager.handleKeyDown
and MediaSessionLegacyHelper so that an adjustment over the
keyguard is allowed to vibrate as well as play sound during
adjustments.

Bug:16202639
Change-Id: Icd36c23e8d08c4ed57922c05724b281f32049be7
/frameworks/base/media/java/android/media/IAudioService.aidl
a8b6bd88cfb010c9e9aa1339e504fd593919e1e0 01-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> Define audio policy, mixes, and mixing rules

An AudioMixingRule is a collection of AudioAttributes and match/exclude
rules.
An AudioMix is defined by its AudioMixingRule, AudioFormat and
routing flag.
An AudioPolicyConfig is a collection of AudioMix and is
parcellable.
An AudioPolicy has an AudioPolicyConfig, and
can be registered/unregistered through AudioManager.

bug 16009464

Change-Id: I01bf95d014967f48ba823648ea897779da099e5d
/frameworks/base/media/java/android/media/IAudioService.aidl
6f34f5ab8ab1b1db7887e5405d8b0031e105ab05 08-Jul-2014 Jungshik Jang <jayjang@google.com> Revamp HDMI-CEC system audio mode integration with audio service.

In previous change we use setForceUse(FORCE_MEDIA, XXX) method
in order to set specific audio output type, such as LINE, HDMI_ARC,
and SPDIF. But it turns out that it conflicts with bluetooth
a2dp which uses the same setForceUse(FORCE_MEDIA, yyy).

This change is based on several conditions.

1. When other non-speaker devices are on, prevent system audio
from turing on.
2. In order to keep track of other devices' connectivity and to
turn off system audio if other device like bluetooth or
headphone preempts current output, register OnAudioPortChangeListner
to audio manager.
3. All possible system audio outputs can be merged with other
outputs without priority.

Change-Id: Id4e47d99db64b9f77a17c2c28c47787ab8980bf7
/frameworks/base/media/java/android/media/IAudioService.aidl
41d974631c5f525da49c88d34cecedd5a4cfeda8 30-Jun-2014 Jungshik Jang <jayjang@google.com> Add volume callback for Hdmi-Cec system audio mode.

Hdmi-Cec's system audio mode delegates audio control to
audio receiver from tv. It requires to delegate
volume change including mute to audio receiver
instead of consuming by tv.
In order to do this this change introduces three apis.
One is added to IAudioService, the others are added
to IHdmiControlService as hidden apis.

1. IAudioService#setHdmiSystemAudioSupported;
This is to notify system audio mode change to audio
service so that it determines to notify volume or mute
change to HdmiControlService.

2. IHdmiControlService#setSystemAudioVolume;
This is to notify volume change to HdmiControlService.
It's called only where system audio mode is on.

3. IHdmiControlService#setSystemAudioMute;
This is to notify volume change to HdmiControlService .
It's called only where system audio mode is on.

Change-Id: I3d8534b37ddf1a812e32012059a8778772044bf0
/frameworks/base/media/java/android/media/IAudioService.aidl
6f0e4ddd66fcdcc13944d8970d0b560e2626508b 18-Jun-2014 RoboErik <epastern@google.com> Remove more dead audio service code

Hit a snag in remote volume changes. Trying off this round of
removal so I can work on fixing remote volume handling in a
separate CL.

Change-Id: I49b1ba4b75d770ba7c77da081755f3210a9e9483
/frameworks/base/media/java/android/media/IAudioService.aidl
83900754f357616b9e56eaf7fc85f49b8906e987 16-May-2014 Eric Laurent <elaurent@google.com> AudioManager: add startBluetoothScoVirtualCall()

Add API to start bluetooth SCO audio connection explicitly
in virtual call mode.

Bug: 11824396.
Change-Id: I1dfab13c659f5855e0b78467ac48b3186af7874c
/frameworks/base/media/java/android/media/IAudioService.aidl
d3c8642dae9a1f6db60e2f8e5c7b32cd1b3169df 16-Jun-2014 RoboErik <epastern@google.com> Remove some more old code and fix Media command

Removes some more hidden apis from AudioService/Manager. This also
fixes up Media.java to support commands for the new service to help
with debugging. Also fixes a couple bugs that were found while fixing
up Media.

Change-Id: I68e4aa80a4de430b98236aafc883664b9432c62b
/frameworks/base/media/java/android/media/IAudioService.aidl
22c921a910d236abf3a1705a02541a49fdaf3a14 28-May-2014 Emily Bernier <ember@google.com> Add an app ops code for microphone muting.

When OP_AUDIO_MICROPHONE (linked to the DISALLOW_UNMUTE_MICROPHONE user
restriction) is set, the system blocks calls to setMicrophoneMute.

Bug: 13585692

Change-Id: Ib32138bcc256cfbac4fe21a090d5ba34f5c641fc
/frameworks/base/media/java/android/media/IAudioService.aidl
4a21b25fad62e4f19d13ba814263841c931f56ef 04-Jun-2014 Julia Reynolds <juliacr@google.com> Allow profile and device owners to change and get the master volume mute state.

Also protect muting master volume with op code OP_AUDIO_MASTER_VOLUME.
Bug: 13585918
Change-Id: I91fe7ee60cd291cca15966b3127c0bb8a4828f6a
/frameworks/base/media/java/android/media/IAudioService.aidl
0a40ec2192e4836b2fcb6ba51a7688aa6bd4ee98 21-May-2014 Mike Lockwood <lockwood@google.com> Add Audio Manager support for Bluetooth A2DP Sink profile

Change-Id: Iff6035e85faf52647cc41a59f98ba2924300eb8d
/frameworks/base/media/java/android/media/IAudioService.aidl
3346a802087f621c6441bc512dfcc17b07143fc6 20-May-2014 John Spurlock <jspurlock@google.com> VolumeZen: SystemUI now hosts the volume dialog.

- Allow SystemUI to set the volume controller interface using
a new binder call to audio service.
- Remove VolumePanel's dependency on AudioService.
- Host the base VolumePanel in the SystemUI process.

Change-Id: I095d5a1a579d42b68d0f81abb4087bd0c754b876
/frameworks/base/media/java/android/media/IAudioService.aidl
fca1e603236b8d1681f784e77e3719d1d59c1428 11-Oct-2013 Jean-Michel Trivi <jmtrivi@google.com> Remote volume changes

When the user plays media remotely, and presses on the volume
keys with the screen off, verify whether not only local playback
is active, but also if remote playback is active to see if
the volume should be adjusted.
When adjusting the volume with screen off, adjust the remote
volume if applicable.

When controlling volume, give priority to local media playback.

Bug 11169862

Change-Id: I88a8c003969177d50d4c1569ec6cd2a7c153a341
/frameworks/base/media/java/android/media/IAudioService.aidl
f108cdd9ee5efe354d87edd02a07b323298c116c 28-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Also rely on enabled notification listeners for RemoteController registration

Registration of a RemoteController may succeed only if:
- the caller has the MEDIA_CONTENT_CONTROL permission,
- or if the RemoteController.OnClientUpdateListener it
registers if one of the enabled notification listeners.

For using the "enabled notification listener" functionality,
the CL involved:
- making OnClientUpdateListener an interface so a 3rd-party
application may have its implementation extend
NotificationListenerService, which is required for a
listener to be enabled by the user.
- add the concept of "enabled" status in an
IRemoteControlDisplay, so a RemoteController (which
encapsulates the IRemoteControlDisplay implementation)
may be registered, but later temporarily disabled by
the user, as a result of a user action in the security
settings, or a user switch.
- making MediaFocusControl, the component tied to
AudioService, monitor changes in enabled notification
listeners, and act upon enable/disable changes.

Bug 8209392

Change-Id: Ia8dfa2156c65668b2b0d4ae92048005912652d84
/frameworks/base/media/java/android/media/IAudioService.aidl
7ddd226e7c6e759feaf2747a90be1cc06acf37a3 02-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> RemoteController class to expose IRemoteControlDisplay features

Wrap all the features of IRemoteControlDisplay.aidl in a
new class, RemoteController, that implements the
IRemoteControlDisplay interface.

The API functions to expose in the SDK are tagged with
"CANDIDATE FOR API"

Bug 8209392

Change-Id: I597bcd503ac93e73889c9ae8b47b16c4fcb363bc
/frameworks/base/media/java/android/media/IAudioService.aidl
c9d1d5f35091226e96fcfa91817480f589eb36e2 12-Sep-2013 Matthew Xie <mattx@google.com> Adjust absolute volume only when the device is streaming music

The device has to be A2DP device
Remove AudioManager#avrcpUpdateVolume
bug 10681804

Change-Id: I2bc85e48fdff374638b984af593c6f1c4ddd3ee6
/frameworks/base/media/java/android/media/IAudioService.aidl
198bc229c37fc65c7b61f1452345fb1da9c385b6 22-Aug-2013 Jean-Michel Trivi <jmtrivi@google.com> Merge "Ratings for RemoteControl" into klp-dev
f823fc4dba2df5cf5f00e13361f2db93c81f6961 20-Aug-2013 Jean-Michel Trivi <jmtrivi@google.com> Ratings for RemoteControl

Add support for metadata of a RemoteControlClient that can be
updated:
- methods to control which keys can be edited,
- interface for an application to receive new values for a key.

Add definitions for ratings.
A rating is:
- a value between 0 and 100
- or a value indicating there is no rating
For a same piece of content, a rating can come from:
- the user
- "others" (i.e. not the user), to provide an average rating
Rating styles are:
- heart (a toggle)
- thumb up / down
- stars (with a configurable maximum number of stars)

Rating by user is editable metadata.

Bug 8440498

Change-Id: I1d45972f9ace4cb505ee0757e917f1d5dedd264e
/frameworks/base/media/java/android/media/IAudioService.aidl
194c140c34d9f4874c64839c2e20ef61f41cbb97 20-Aug-2013 Jeff Brown <jeffbrown@google.com> Merge changes Id3815fe8,I90a85921 into klp-dev

* changes:
Define AudioSource.REMOTE_SUBMIX.
Remove setRemoteSubmixOn method.
f15ef4b02cf2e4298a6eca9709693f1e720c18c6 10-Aug-2013 Jeff Brown <jeffbrown@google.com> Remove setRemoteSubmixOn method.

The submix will be controlled automatically from now on based on
whether there is an active audio recorder.

Bug: 10265163
Change-Id: I90a8592136c6507680e70f054243df70cc82efad
/frameworks/base/media/java/android/media/IAudioService.aidl
5a0cf7a27f3953a1266af48543ccd9024f4cd89f 19-Jul-2013 John Du <johnldu@google.com> Adding support for Absolute Volume

Change-Id: I7bbc6f9296221ca219a50a5e377ebac9dcf5a407
/frameworks/base/media/java/android/media/IAudioService.aidl
68d6dedcc3a7d7ceaad297e59248332eb900113c 02-Aug-2013 Jean-Michel Trivi <jmtrivi@google.com> Remove whitespace in IAudioService.aidl

Change-Id: I537a2ad8356b04fec25bd7a5a8934f0bc343c1f6
/frameworks/base/media/java/android/media/IAudioService.aidl
2380566debfc57eb1cc07db1306ccee23b84ddd4 31-Jul-2013 Jean-Michel Trivi <jmtrivi@google.com> Notification muting conditional to exclusive audio focus request

Summary of feature:
Do not mute notifications when speech recognition recording is
active, but when an app has requested audio focus with
AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE.

Implementation:
Move definition of AUDIOFOCUS_NONE to AudioManager where other
audio focus codes are defined.
Add support for querying the current audio focus type.
When audio focus is requested as GAIN_TRANSIENT_EXCLUSIVE, make
the corresponding loss by LOSS_TRANSIENT.
Before playing a notification, check whether GAIN_TRANSIENT_EXCLUSIVE
has been requested.

Bug 8251963

Change-Id: I41edc77326b70639d2fdcb4642c53109995b72a8
/frameworks/base/media/java/android/media/IAudioService.aidl
fa9a69805b001034aa04c3b33989a7ac21522371 28-Jun-2013 Jean-Michel Trivi <jmtrivi@google.com> Refactor for audio focus, remote control, media button handling

Extract audio focus, remote control and media button handling
outside of AudioService without any changes in functionality.
Moving logic to new class, MediaFocusControl.
Introduce interface for managing volum control logic, VolumeController.
The VolumePanel class implements this interface.

Change-Id: I72bda2e0670c26e61ff076fd729c15f9f1156dc5
/frameworks/base/media/java/android/media/IAudioService.aidl
ba50b97cff80e73620a0e3d13cae169e095974a7 01-May-2013 Dianne Hackborn <hackbod@google.com> Add new app ops for various interesting audio service things.

Media buttons: note when an application tries to take ownership
of the media buttons.
Audio focus: note when an application tries to take audio focus.
Volume levels: note changes to the volume level of the various
streams.

Maybe we should also have some ops for muting streams, soloing
streams, etc?

Change-Id: I79a5d477b0bad4ff61486cdb73ffb1196a674964
/frameworks/base/media/java/android/media/IAudioService.aidl
c3c4babf8424f65b3d3d2700f60fae6e94e9cd00 19-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> Opt-in mechanism for RemoteControlClient position anti-drift check

RemoteControlClient has an interface for the framework to query
the playback position. This mechanism is used to detect
when the estimated position drifts from the real position by
having the framework regularly poll (every 15s when playing at
1x) this interface and compare against the estimation.
But this mechanism:
- should only be used when IRemoteControlDisplay implementation
care about position display
- should not be used by default because the implementation of
the position query interface might involve network traffic
in some remote media player implementation for instance.

This CL implements an opt-in mechanism to be used by
implementators of IRemoteControlDisplay, to request the
anti-drift mechanism to be turned on.

bug 8120740

Change-Id: I1baa3e515546ac41e0ac9c3a41bfa3147ecf3d7f
/frameworks/base/media/java/android/media/IAudioService.aidl
c18c9138cee0f0859bcab636a004ce92ca4a9ab5 13-Apr-2013 Eric Laurent <elaurent@google.com> AudioService: SCO audio backward compatibility

After commit 25fc29b3, AudioManager.startBluetoothSco()
does not use virtual voice call mode anymore when starting the
SCO audio connection to the headset.
To help backward compatibility, this change makes that virtual voice call
is used if the request comes from an application targeting a SDK version
before JB MR2. For applications targeted to JB MR2 and above a raw SCO
audio connection is established.

Bug 8157702

Change-Id: If1ded2fd99b7ed76d2435d95ee03659e78a7882a
/frameworks/base/media/java/android/media/IAudioService.aidl
79f7ec70ebd5758ce54fd5b6fcd60fd27457cba6 05-Apr-2013 Dianne Hackborn <hackbod@google.com> Have audio service clean up new receivers in crashing processes.

The new media button receiver with only a pending intent (no
component name) could be left hanging if the process that
registered it went away. These semantically need to be tied
to the calling process's lifetime; we now clean them up when
the calling process goes away.

Also added some additional cleanup of media button receivers
when packages change (updated, cleared).

And on top of that, a new "media" command for doing media
things. Currently lets you send media keys and monitor
remote display data.

Oh and finally added a new BaseCommand base class for
implementing these command line utilities.

Change-Id: Iba1d56f10bab1eec4a94a7bb1d1c2ae614c8bcf5
/frameworks/base/media/java/android/media/IAudioService.aidl
6a5702041f48f868863a0454d7df6cd64eab235d 03-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> Merge "RemoteControlClient receives playback position change requests" into jb-mr2-dev
3261b537c5fdec824575a1f6ad6d8942715e82e2 01-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> RemoteControlClient receives playback position change requests

RemoteControlClient defines two listener interfaces for playback
position, one to let the framework query the current playback
position, the other to request playback to seek to a given
position.

Updated IRemoteControlDisplay interface to support passing info
about whether the user of RemoteControlClient can provide a
playback position, and receive a new one.
Updated implementations of IRemoteControlDisplay to new
interface.

Bug 8120740

Change-Id: I1a5a969da4d0f8c9ad27f691919dd08f8653982b
/frameworks/base/media/java/android/media/IAudioService.aidl
b839b83c7349533b4cb7278fd3d792b47199ba36 30-Mar-2013 Jean-Michel Trivi <jmtrivi@google.com> Clean up role of component name in media button event receiver

A public API was added to AudioManager to register a media button
event receiver whithout having to supply a ComponentName.
This CL updates the comments that specified that the now optional
ComponentName parameter can be null, and never persist the button
event receiver is there is no ComponentName to persist.
Also unregistering the media button receiver makes no use of
the ComponentName anymore.

Change-Id: Idcfed1e2a85feb6fa178ca7797427f238705957c
/frameworks/base/media/java/android/media/IAudioService.aidl
bc43b4c2f24fd03c0d0546895c97918c1736d9fb 22-Mar-2013 Jean-Michel Trivi <jmtrivi@google.com> RemoteControlClient can report current position, speed

Extend RemoteControlClient class to support reporting the
current playback position, and the playback speed.
Define listener for an application to receive new playback
position to seek to (use of listener to be implemented).
Update IRemoteControlDisplay implementations to new interface.

bug 8120740

Change-Id: I2654daeca1ac49713d325df8226dceb85943c020
/frameworks/base/media/java/android/media/IAudioService.aidl
eefee4396494655a67cea8bbcd8d892db9a96494 12-Mar-2013 Jean-Michel Trivi <jmtrivi@google.com> Fix race in media button intent registration

AudioManager.registerMediaButtonEventReceiver maps to
AudioService.registerMediaButtonIntent
AudioManager.registerRemoteControlClient maps to
AudioService.registerRemoteControlClient
To use RemoteControlClient, an application needs to have
first registered its button event receiver. Therefore
registerMediaButtonEventReceiver() needs to have
completed registration when returning, otherwise the
RemoteControlClient registration can sometimes fail due
to the lack of association between the button event
receiver and the RemoteControlClient.

Bug 8315459

Change-Id: I82c196c3f21a65e38bad275085ed4f9ec0ec60dd
/frameworks/base/media/java/android/media/IAudioService.aidl
4a5700556191c835116ec2a6997a4f16f464ac9d 04-Mar-2013 Jean-Michel Trivi <jmtrivi@google.com> Support multiple IRemoteControlDisplay

Modify RemoteControlClient and AudioService to support multiple
simulataneous IRemoteControlDisplay interfaces active at the
same time.

Change-Id: I9f200a488afdd62a5e6957e64624d745e0f28149
/frameworks/base/media/java/android/media/IAudioService.aidl
dd45d01128423a82652a3c9d77fa393631d95229 08-Oct-2012 Eric Laurent <elaurent@google.com> enforce camera sound according to country code

Use mcc config overlay mechanism to enforce camera shutter sounds
in countries where it is mandatory.
Property ro.camera.sound.forced is not needed anymore.
When camera sound is forced, STREAM_SYSTEM_ENFORCED is removed from
streams affected by ringer mode and its volume is
maxed out. AudioSystem.FORCE_SYSTEM_ENFORCED is sent to audio
policy manager to alter the routing policy for STREAM_SYSTEM_ENFORCED.

Also fix streams being unmuted when settings are reloaded
upon user switch while in silent mode.

Add ringer mode to audio service dump.

Bug 7032634.

Change-Id: Iceea5bba3b8d3aabf8e42b222deb33a893dc8f38
/frameworks/base/media/java/android/media/IAudioService.aidl
2ac2afeac989ea1dc326b0db996d6c6c8e00cc29 21-Aug-2012 Jean-Michel Trivi <jmtrivi@google.com> Add support for controlling remote submix audio routing

Add method in AudioManager to control remote submix through
AudioService.
AudioService controls remote submxi: enabling/disabling
remote submix will:
- make the sink audio device available/unavailable
- make the audio source available/unavailable
- force/unforce media streams to be routed to WFD

Change-Id: I05d9cc7c3e8a720318ec1385737cbd46a21a3207
/frameworks/base/media/java/android/media/IAudioService.aidl
1357012968f9066ea3051d83995e9bac69526c3c 19-Jun-2012 Jean-Michel Trivi <jmtrivi@google.com> Remote volume handling in MediaRouter

Extend MediaRouter.UserRouteInfo to enable setting playback
information, which includes volume. When the user route instance
has a RemoteControlClient, forward any playback information to it.
Enable specifying a callback to be notified of volume events
on the route.
Extend MediaRouter.RouteInfo to enable retrieving playback
information.

Update RemoteControlClient javadoc to reflect which parts of the
API are not intended to be made public.

Change-Id: I59d728eb61747af6c8c89d53f0faeb07940594c3
/frameworks/base/media/java/android/media/IAudioService.aidl
3114ce3861f20f9a5c2c59dd2629197a1f4874a8 12-Jun-2012 Jean-Michel Trivi <jmtrivi@google.com> Remote volume handling

Extend RemoteControlClient class to enable an applicaton to
specify more information about how it's playing media, now covering
usecases where media playback happens "remotely". This playback
information can be used to set the volume and maximum volume
used remotely.
Declare a new intent and associated extras in Intent,
ACTION_VOLUME_UPDATE, so an application can be notified that
the volume it handles should be updated. It can then use
the new RemoteControlClient.setPlaybackInformation() method
to notify AudioService what the volume is.
Extend AudioService to maintain playback information associated
with the RemoteControlClient information in the stack of
media button event receivers (mRCStack). The information
about the active remote is cached so the stack doesn't have
to be iterated over in order to retrieve remote playback info.
Events to "adjust" the remote volume based on hardware key
presses cause the client application to be notified of
volume updates, and the volume panel to display the volume
set by the app.
Revise which stream type is controlled when none is specified
according to latest guidelines for remote playback.
Update VolumePanel class to support a new pseudo stream type,
AudioService.STREAM_REMOTE_MUSIC, that corresponds to the
remote playback volume, and uses the new "media route" icon.
Enable it to receive asynchronously new volume values for
the remote that will be displayed if the UI is still up,
and ignored otherwise.
Now supports hiding/showing sliders dynamically so remote
volume only appears when AudioService has a remote control
client handling remote volume.
Define new java symbols for the two media route icons.
Modify lockscreen behavior: don't automatically control music
volume when music is active, consider also remote playback.

Still to do:
- playback information set by RemoteControlClient should post
a message for AudioService to update playback information
instead of updating it synchronously

Change-Id: I557aa687239f9acfe33a609f05876c67fa7eb967
/frameworks/base/media/java/android/media/IAudioService.aidl
632ca417f0a33e3fa9ccece531afa2db3f0d4a30 15-Jun-2012 Dianne Hackborn <hackbod@google.com> Add new callback for MediaRouter to found out about device changes.

The AudioService now has an API to call to get the currently
connected devices, and later reports of changes in connection
state. The information includes the name of the bluetooth
device if one is connected for display to the user, and states
for all of the pluggable devices. No longer requires a Bluetooth
permission to keep the routes updated.

Change-Id: I81ca421c60592fbc1592477d59bf1c9d1b64954a
/frameworks/base/media/java/android/media/IAudioService.aidl
4ab22bb7d0aafce1be200153d71d432c9d54e04a 12-Jun-2012 Eric Laurent <elaurent@google.com> Made IAudioService.setBluetoothA2dpOn() not oneway

IAudioService.setBluetoothA2dpOn() should not be one way as
IAudioService.isBluetoothA2dpOn() will return inconsistent results
if called just after.

Bug 6572651.

Change-Id: Ib03ae49e6c0041b1b37dcac9e198cd93a4794030
/frameworks/base/media/java/android/media/IAudioService.aidl
b1fbaaccb656ef09a8770c28df15e3e91a452e64 29-May-2012 Eric Laurent <elaurent@google.com> Send device connection intents from AudioService

AudioService is currently notified of wired headset and A2DP
sink connection states via broadcast intents from WiredAccessoryObserver
and BluetoothA2dpService. This is a problem as there is no guaranty that
AudioService can take actions upon the change before other apps are notified.
For instance, the Play On feature requires the UI to be refreshed when a device
is inserted/removed and we must guaranty that the UI component can read
new A2DP enable state from AudioManager after it receives a device connection state
change intent.

- Added hidden methods to AudioManager so that WiredAccessoryObserver
and BluetoothA2dpService can notify AudioService of device connection directly.
- The wired accessories connection intents are now sent by AudioService.
- The A2DP state change intent is delayed by BluetoothA2DPService when
ACTION_AUDIO_BECOMING_NOISY is sent by AudioService
- ACTION_AUDIO_BECOMING_NOISY intent is not sent when disconnecting A2DP
while a wired headset is present and vice versa.

Bug 6485897.

Change-Id: Ie160b3ee5f451132065530772b868593c90afd94
/frameworks/base/media/java/android/media/IAudioService.aidl
7847211fb4699bf6018e29d214a918ed6657319b 21-May-2012 Eric Laurent <elaurent@google.com> AudioManager: restore setBluetoothA2dpOn() method

Remove deprecation on setBluetoothA2dpOn() method so that applications
can override the default audio policy which is to use A2DP
for media whenever connected.

The request is not persistent and the default policy is restored when a
new A2DP i ro wired headset connection occurs.

Bug 6485897.

Change-Id: I2a4b6b6bdba55f7b133e64f86d27c03eb86acfa4
/frameworks/base/media/java/android/media/IAudioService.aidl
722b808662eb20fa91151f1e3aa05fd911d1d226 16-May-2012 Jean-Michel Trivi <jmtrivi@google.com> Handle media button events during phone calls and when ringing

Add functionality in AudioManager/AudioService to register a
media button receiver for telephony that, when registered, gets
priority for media button key events during a phone call or
when ringing.

Bug 6484717

Change-Id: I0835fc02cb24d06ca59af5a32c3ba0ae93e54442
/frameworks/base/media/java/android/media/IAudioService.aidl
c68022258ebd3dd97a5079ba99f4f3cd12b223b0 30-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> Optimize how AudioService receives media button events

AudioService maintains a stack of registered media button event
receivers.
This change modifies the broadcasters of ACTION_MEDIA_BUTTON intents
let AudioService directly handle the corresponding key event instead
of trapping the intent sent by PhoneWindowManager, KeyguardViewBase
and PhoneFallbackEventHandler.
Because the key event may be sent through a PendingIntent,
AudioService now also implements the OnFinished interface to be
notified when the event was consumed so it can release the wake
lock held if it was held when the key event needed to be sent
(see where PassHeadsetKey was instanciated in PhoneWindowManager).

Change-Id: I2e8614df94af9d54edbf714ef443cc372d21827a
/frameworks/base/media/java/android/media/IAudioService.aidl
098d580cc2bb6c0891c756a4e5230c6c6b0d2376 27-Apr-2012 Jeff Sharkey <jsharkey@android.com> Migrate ringtone playback to SystemUI.

Introduce IRingtonePlayer, which handles playback for both Ringtone
objects and Notifications. SystemUI now hosts this player, which it
registers with AudioService. It also keeps MediaPlayer instances
warm, and cleans them up after stop() or Binder death.

Move both Ringtone and NotificationManagerService to play back audio
through this new interface.

Bug: 6376128, 6350773
Change-Id: I1dcb86d16ee3c4f07cdb2248d33dcff4ead3609a
/frameworks/base/media/java/android/media/IAudioService.aidl
6d5176638c2189595cede38fb92c3e7e8700e221 24-Apr-2012 Eric Laurent <elaurent@google.com> system and UI sounds volume policy

Implement a more consistent policy for system and UI sounds (key clicks, lock/unlock,
camera shutter, DTMF, low battery...):
- All system sounds are played over STREAM_SYSTEM stream type.
- The STREAM_SYSTEM volume that was previously fixed now tracks the volume of a "master"
stream type. This "master" stream type is STREAM_RING for phones and STREAM_MUSIC for
tablets which corresponds to the stream whose volume is modified by default by the volume
keys.
- The STREAM_SYSTEM volume ranges from -24dB to -6dB (-24dB to -12dB over headphones) when the
"master" stream volume ranges from its min to its max.
- DTMF tones are played over STREAM_DTMF that tracks the "master" stream volume in the same
manner with the following exception: when in call, DTMF stream tracks STREAM_VOICE_CALL volume.
- Camera shutter sound is played over STREAM_SYSTEM_ENFORCED stream that tracks the "master"
stream volume except in countries where regulation enforces this sound. In this case
its volume is fixed and cannot be muted.
- Low battery sound is played over STREAM_SYSTEM and therefore has a tunable volume and is
heard while in call.

Issue 6344620.
Issue 6069229.
Issue 6213100.

Change-Id: I53a237878ead596e706c5dbbb1420e62cde32bd7
/frameworks/base/media/java/android/media/IAudioService.aidl
45c90cefd13a03b852bb4b8da4be218876cbbb32 25-Apr-2012 Eric Laurent <elaurent@google.com> Fix AudioManager.forceVolumeControlStream()

AudioManager.forceVolumeControlStream() is used by VolumePanel to temporarily force the
stream type which volume is controlled by volume keys.

Current implementation is not working if the VolumePanel is not executed by the same process
as the one receiving the volume key events.

Issue 6302421.

Change-Id: I2700587a027ffb962429b42083312cd92fe79215
/frameworks/base/media/java/android/media/IAudioService.aidl
0273af55cf68d54d26d154b44d105d40fed79701 05-Apr-2012 Justin Koh <justinkoh@google.com> Adds flag argument to setMasterMute.

Adds flag argument to setMasterMute. This allows third parties to edit it
without showing the UI, for example.

TESTED = runs on Tungsten.

Change-Id: Idfd99a2476e60059cd93c9dfe07d03a389c3f5f5
/frameworks/base/media/java/android/media/IAudioService.aidl
cfbcd3bf21c8453e9afd7740fdb7fc272c362389 14-Nov-2011 Mike Lockwood <lockwood@android.com> AudioManager: Add support for master mute

Change-Id: I98e87d1e266e0523c4aacb23cc5c4b3fdc7a1eac
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/media/IAudioService.aidl
a2aa08e20cb4f1e302bb7ae05882cd1be8cfa0d2 08-Nov-2011 Mike Lockwood <lockwood@android.com> AudioManager: transparently convert volume settings for other streams to master volume if config_useMasterVolume is set.

This allows Music2 and other media apps to control master volume without changing their code

Bug: 5567694

Change-Id: I48b6260b193b22c395be5a31cd1d270b2929a91e
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/media/IAudioService.aidl
5020e7e2d37865da862846b97d9959e83244a35e 27-Oct-2011 Mike Lockwood <lockwood@android.com> VolumePanel: Add support for master volume

Change-Id: I3119eb2b7d3b5e7ce87f1660b50c10ab79c7bbdf
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/media/IAudioService.aidl
dff25597a9a862143c69e70e6ed86790538c23c1 25-Oct-2011 Mike Lockwood <lockwood@android.com> Simple master volume support

Still needs integration with Settings (for persistence) and VolumePanel UI.

Change-Id: I9eca92c4b1ef2df2564411006a35753ab9618dce
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/media/IAudioService.aidl
f0cff0456258478ba768097f73d4367ab67fd7a3 15-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5300223 RemoteControlClient uses PendingIntent for media button events

Update the implementation of the RemoteControlClient / Display
feature rely on PendingIntent as provided in the construction
of the RemoteControlClient instance.
The ComponentName that describes the target of the media button
events is set as the target of the Intent from which
a PendingIntent is constructed.
This ComponentName is still saved in the stack for persisting
the last media button event receiver.

This CL also updates the lockscreen IRemoteControlDisplay
implementation to use the PendingIntent supplied by the
application when sending transport control events. A (good)
side effect of doing this is that intent will be directly
targeted at the application.

Restoration of the media button event receiver
after reboot is not fully functional yet.

Change-Id: I2be82f2839e9dee1de02512437b3fb41cc386cde
/frameworks/base/media/java/android/media/IAudioService.aidl
4426e42ac6107bf6b09f7c4cdad39eb161d8b9ca 19-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5045498 New implementation of remote control API

Remote control displays expose an IRemoteControlDisplay interface
which they register through AudioManager.
Remote control clients create a RemoteControlClient object, which
implicitely exposes an IRemoteControlClient interface registered
in AudioService through AudioManager.
AudioService tells all clients and displays when a new client
is the one that should be displayed.
A client's data gets sent to the display when it is valid, or
it sets new data (while being valid).

The implementation for setting metadata and album art is temporary,
and will migrate to the MetadataEditor API in future CLs.

Change-Id: Ibab6ea1d94c68f32482c760c6ae269541f885548
/frameworks/base/media/java/android/media/IAudioService.aidl
178889eff7fa3361a5cb08d6d43846a1baf5216b 16-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5045498 RemoteControlClient interface

Define a RemoteControlClient interface that applications must
implement and register to be displayed on the lockscreen.

Change-Id: I67276ae653f203e76727432231f1d76535c31942
/frameworks/base/media/java/android/media/IAudioService.aidl
b5f04d6dbf5106140df367ae07f0e7708e1b650e 10-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Pass flags on remote control client information change in intent

Pass the flags about what information changed in the remote
control client in the intent used by the remote control display.
Also pass the IRemoteControlClient to verify it is still current
before sending the intent.

Marked some logs as to be removed before release.

Change-Id: Ib3aa22d061e5dfaf80a9c4c78774c931a2cf0fbd
/frameworks/base/media/java/android/media/IAudioService.aidl
7b6198cacc3e7dd31ef91537d809857d826fb7fa 07-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5045498 API for client to notify remote control info changed

Update to API for a client to notify what type of information
changed (e.g. playstate, metadata) to optimize small updates
without the remote control display having to do expensive
queries such as album art.

When the remote control display retrieves the flags about
what information changed, the flag gets cleared.

Change-Id: I7d3d8d3eecd1da44695d84905ed9e7b70fe38b86
/frameworks/base/media/java/android/media/IAudioService.aidl
ced110ec5970c632f523dfc0350b6071461ea9bc 05-Aug-2011 Neel Parekh <neel@google.com> Make retrieving remote control client go through binder interface

The way the old way worked relied on the process retrieving the
current remote control client to be in the exact same process as
the AudioService. This removes that dependency.

Change-Id: I1ba8bf32b61ec1e979ef7eee9661ba801aa19690
/frameworks/base/media/java/android/media/IAudioService.aidl
a30a21cf2ef37b490e3790aad3105cda115124d6 04-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Remove empty remote control client listener methods

Remove non-implemented methods for registering IRemoteControlClient
listeners.

Rename refreshRemoteControlDisplay() method to follow framework
conventions.

Change-Id: I9254e8eeea9020a530c9a32f328f0ef7dbd9dd0c
/frameworks/base/media/java/android/media/IAudioService.aidl
8f619182cb759718f64ab95fd6d61c16138f6952 22-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Remote control display API and implementation

Extend the media button event registration AudioManager API to
enable applications to register as a client of "remote controls"
and let them provide information meant to be displayed
by the remotes.
AudioService sends a AudioManager.REMOTE_CONTROL_CLIENT_CHANGED
intent to let remote controls know when / from whom they can
retrieve the information to display.
Only application that own audio focus, are the currently
registered media button event receiver, and have registered
a remote control client, are eligible to appear on the
remote control.

To address in future CLs:
- change how a remote control client forces a refresh
- rename methods called under lock to ___Locked()
- make API public

Change-Id: Icca30ab05dac2605ee9246f8acb27a03dcea077a
/frameworks/base/media/java/android/media/IAudioService.aidl
25101b0b9a84571ead15b26e9f4cd9c4298d7823 02-Feb-2011 Eric Laurent <elaurent@google.com> Fix issue 3371080

Modified default volume control logic in AudioService:
1 IN_CALL volume if in video/audio chat
2 NOTIFICATION if notification is playing or was playing less than 5s ago.
3 MUSIC

Modified silent mode:
- now also affect MUSIC stream type
- entering silent mode when VOL- hard key is pressed once while selected
stream volume is already at 0 (except for VOICE_CALL stream).
- exiting silent mode when pressing VOL+ hard key while in silent mode

Play sound FX (audible selections, keyboard clicks) at a fixed volume.

Modified audio framework:
- isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger)
- iStreamActive() now specifies a time window during which the stream is considered
active after it actually stopped.

Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
/frameworks/base/media/java/android/media/IAudioService.aidl
3def1eec2baed0b8845ec32c871e249dc533a9d9 18-Mar-2010 Eric Laurent <elaurent@google.com> Issue 2416481: Support Voice Dialer over BT SCO.

Added public methods to AudioManager API so that unbundled applications can use bluetooth
SCO audio when the phone is not incall.
Without this change, the only way to activate and use bluetooth SCO is via the BluetoothHeadset API
which is not public yet.

Change-Id: Ia1680f219ea1d0943092d475d5be7d6638983ebb
/frameworks/base/media/java/android/media/IAudioService.aidl
d327f21626217aa3c9c0cdb7a84a742c531e59a3 17-Mar-2010 Jean-Michel Trivi <jmtrivi@google.com> Implementation of the policing of transport control key press
events among multiple applications competing for the remote control
focus.
AudioManager defines a new API for applications to use in order to
register their BroadcastReceiver for the media button as the one
to receive the corresponding intent, but all applications at the
same time (in an ordered broadcast).
AudioService handles a stack of remote control focus owners. It
traps ACTION_MEDIA_BUTTON intents and sends a new intent to the
remote control focus owner.

Change-Id: I3c109221ecfb160cbb1ec0e40a71b241aad73812
/frameworks/base/media/java/android/media/IAudioService.aidl
d5176cfe6eae954e9cef1e2ec17859a5089e1330 28-Jan-2010 Jean-Michel Trivi <jmtrivi@google.com> First implementation of the audio focus management as an extension
of AudioManager and AudioService.
/frameworks/base/media/java/android/media/IAudioService.aidl
9272b4b4a44fe1f33e3030810618194f817caaec 24-Jan-2010 Eric Laurent <elaurent@google.com> Fix issue 2349345: Media sound output stuck on earpiece rather than speaker.

This change fixes a problem occuring when an application (for instance a VoIP application)
changes the audio mode to MODE_IN_CALL and crashes. In this case, the audio routing policy
remains as if we were in call until the audio mode is changed back to MODE_NORMAL, for instance when a new call
made or received and terminated.

The fix consists in registering a death receipient to the binder that made the setMode() request and resetting the audio
mode in case of client process crash.
/frameworks/base/media/java/android/media/IAudioService.aidl
c42ac9d4d03f62c3a1ba197a28a81fda44bd8b7f 29-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 2019031: Volume changes have no effect.

Send initStreamVolume() for each stream when media server restarts.
Also added restoring of phone state, device connection state and forced device for communications.
/frameworks/base/media/java/android/media/IAudioService.aidl
a553c25b33c99b345cf1c8688f8df0ed8df14e5a 17-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 1795088 Improve audio routing code

Initial commit for review.
Integrated comments after patch set 1 review.
Fixed lockup in AudioFlinger::ThreadBase::exit()
Fixed lockup when playing tone with AudioPlocyService startTone()
/frameworks/base/media/java/android/media/IAudioService.aidl
4050c93601b3c3609b21cc1e18a29b64747e7fa9 08-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 1967295: Add a method to request reloading of audio settings by AudioService.
/frameworks/base/media/java/android/media/IAudioService.aidl
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/media/java/android/media/IAudioService.aidl
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/media/java/android/media/IAudioService.aidl
3001a035439d8134a7d70d796376d1dfbff3cdcd 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
/frameworks/base/media/java/android/media/IAudioService.aidl
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/media/java/android/media/IAudioService.aidl