History log of /frameworks/base/media/java/android/media/AudioManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b561ccedd89f92b249c06522e960b135a02107d8 30-Jan-2015 Wonsik Kim <wonsik@google.com> audio: allow audio port cache update even when audio patches contain invalidated sources/sinks

When an audio device disconnects from Android, custom audio patches
containing the device become invalidated.
AudioManager::updateAudioPortCache() used to fail in that case, but
it causes onAudioPortListUpdated() event never gets called so that
the creator of the custom audio patch cannot update it. Let
updateAudioPortCached() succeed even in the case so that the entity
that created the audio patch can get notified.

Bug: 18909299
Change-Id: If4f6ed73f69213d792117fb42aec103ae2e50b79
/frameworks/base/media/java/android/media/AudioManager.java
f076db407029e734703d8676f806bea94393e824 14-Jan-2015 Eric Laurent <elaurent@google.com> AudioManager: make AudioPortEventHandler static

Make AudioPortEventHandler and audio port and patch caches
static members of AudioManager. There is only one callback
per process in AudioSystem for audio port updates
and having those non static would not work when more than
one AudioManager instance exists in one app.

Bug: 18727023.
Change-Id: I4c1041dc6441d168be4efa066e14289cc5f41872
/frameworks/base/media/java/android/media/AudioManager.java
8638877f14f925ec8fc34a24ac4f239e6d5dfd6c 07-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Support collaborative audio focus handling" into lmp-mr1-dev
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/AudioManager.java
7c82ced4fc5b66c09a19eed9a5499039530142fb 05-Dec-2014 RoboErik <epastern@google.com> Route mute key events through MediaSessionService

This sends mute keys to the MediaSessionService and handles them
by toggling the appropriate stream. Muting remote playback is still
not supported.

bug:17501993
Change-Id: I18c5b037cde2175acbb64b118dd708514acfd8c9
/frameworks/base/media/java/android/media/AudioManager.java
57457b98cfec197283c42585a3bc4abb1b21d05b 02-Dec-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "AudioMix address and type, rule exclusion API, dynamic source" into lmp-mr1-dev
21d68f4808db02aa3252ba5dec8b0220d053cab3 01-Dec-2014 John Spurlock <jspurlock@google.com> Merge "Volume: Improve inline volume controls used in settings." into lmp-mr1-dev
1b3541d5eedb332ea01066b4a78a2d06d5304044 25-Nov-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioMix address and type, rule exclusion API, dynamic source

- Simplify API for defining an exclusion-based rule: don't define
an exclusion rule, add instead a way to exclude a rule.
- API for defining rules for dynamic sources (rule match on capture
preset).
- Verify mix type when creating AudioRecord or AudioTrack for a mix.
- Use hashcode of mix for generating the device address.
- AudioService dump prints info about registered policies.
- Annotate as SystemApi the audio policy-related APIs.
- Express mixing match and exclude rule constants as flags for
future-proofness

Bug 16006090
Bug 16009464

Change-Id: I0dabe71204501acaffea7ef0ddbbab9700e1bd87
/frameworks/base/media/java/android/media/AudioManager.java
bcc1087af40a0e1bb35dbe8a39c830ecdea8280b 28-Nov-2014 John Spurlock <jspurlock@google.com> Volume: Improve inline volume controls used in settings.

- Make the system internal ringer mode change signal available to
other system components via a standard intent, instead of a
volume-controller-only binder call.
- Update sysui to use new intent for icon policy.
- Add proper muting state to the volumizer, to look more like
the associated volume panel slider.
- Add basic ringer mode state tracking for the notification-ring
slider setting.

Bug: 17899613
Change-Id: Ie2df52edb070055ef59c74039162a0e785d2fdbb
/frameworks/base/media/java/android/media/AudioManager.java
bc3226e21dfe881bf1ccae62e10b660d97b2b232 26-Nov-2014 Jinsuk Kim <jinsukkim@google.com> Merge "Do not perform forceVolumeControlStream in master volume mode" into lmp-mr1-dev
57d766f533f212d30c542cee98f31ca9630681a8 26-Nov-2014 Jinsuk Kim <jinsukkim@google.com> Do not perform forceVolumeControlStream in master volume mode

The method should be no-op when in master volume mode.

Bug: 18250921

Change-Id: Iaab806db935ef97aa1124c3447e228d3eaef7584
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
670a82cbb1b62e69fa7ef7387eed545a76c96f76 27-Oct-2014 Eric Laurent <elaurent@google.com> Merge "audioservice: fix default stream volume" into lmp-mr1-dev
91377de6f23af2b0b08adae22810cae6fc35cb1a 11-Oct-2014 Eric Laurent <elaurent@google.com> audioservice: fix default stream volume

When the max stream volume is configurable by
a system property, the default stream volume should
be set accordingly.

Bug: 17507571.

Change-Id: I9d9378292fc7b9c9e32acc55a275cc0ae5b203d4
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
d608f3abacb4223c2d6b52db3008039689aa5d55 11-Sep-2014 Terry Heo <terryheo@google.com> Merge "Add a system API to query hdmi system audio mode" into lmp-dev
0c37ba318847a44cb9256e55eca1160dc1fffd4d 08-Sep-2014 Jason Monk <jmonk@google.com> Add user-specific playSoundEffect and use in NavBar

Add a hidden version of playSoundEffect that takes a userId to
get the correct setting as to whether sound effects should play
or not.

Bug: 15106706
Change-Id: I5c0b74081fd00732a43fe42a76d33d05197333d0
/frameworks/base/media/java/android/media/AudioManager.java
deddda5d62498bbaa9789c622be7a08be83f2f51 05-Sep-2014 Jean-Michel Trivi <jmtrivi@google.com> Respect Android conventions in AudioManager extras

Update the value of the extras in android.media.AudioManager
used in ACTION_HDMI_AUDIO_PLUG to respect the Android
naming conventions.

Bug 17390818

Change-Id: Ied1830e0ffa3b1fa7235d0675f36f2f43aac554d
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
5f4cfd3ab73f4d8173db05d7c94c098a06cd5f57 02-Sep-2014 Jean-Michel Trivi <jmtrivi@google.com> Merge "Move *_AUDIO_PLUG actions from Intent to android.media.AudioManager" into lmp-dev
c5258433dd353769ccfa2e5e769a7379378a3a0b 28-Aug-2014 Jean-Michel Trivi <jmtrivi@google.com> Move *_AUDIO_PLUG actions from Intent to android.media.AudioManager

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
/frameworks/base/media/java/android/media/AudioManager.java
9e477e408433fe1bd0c695b1e7a0738a76009cfd 26-Aug-2014 Jean-Michel Trivi <jmtrivi@google.com> More AudioManager.generateAudioSessionId() javadoc

Expand the javadoc for AudioManager.generateAudioSessionId() to
describe what audio session IDs are used for.

Bug 17059255

Change-Id: I7a8764fd12fa332af747c4d584b0079e80bacf44
/frameworks/base/media/java/android/media/AudioManager.java
a66c40bf6e0fb79ead6d8a9fc29c5671fa7b1206 16-Aug-2014 RoboErik <epastern@google.com> Update MediaSession APIs for council feedback

-Changes MediaSessionManager.SessionsListener to OnActiveSessionsChangedListener
and makes it an interface.
-Renames MediaController.VolumeInfo to MediaController.AudioInfo
-Renames MediaSession.Track to MediaSession.Item

bug:17059552
Change-Id: I3a0b4371700ad6657972c312a5ab89ddfac6df5b
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
4f0f120316cfcee5880191264885772677fff921 05-Aug-2014 John Spurlock <jspurlock@google.com> AudioService: getMasterStreamType -> RING on tablets.

Since all service-internal checks use stream alias, and the alias
for NOTIFICATION is RING, even on tablets.

This is a followup to ag/506532.

Ensure that #getMasterStreamType always follows the stream_system
alias, and update the system alias for tablets per the new policy.
Update the associate javadoc comment in AudioManager to make this
clear.

Note: there is now no difference in the alias maps between phones
and tablets.

Also fix a condition affected by this in VolumePanel.

Bug:16626879
Change-Id: I2700a48d2a3e7703607f771a1ab7f325596fd789
/frameworks/base/media/java/android/media/AudioManager.java
fdaed9dcb63171379fd7c5a6208014bac505dbc6 29-Jul-2014 Eric Laurent <elaurent@google.com> Fix capitalization on AudioPort callback method names

Change-Id: I87963ea7290989333781bf8905c9ae640c34d943
/frameworks/base/media/java/android/media/AudioManager.java
b214efbb9170a9f6a4991684a63ca59680074cc7 24-Jul-2014 RoboErik <epastern@google.com> Expose a way to set a PendingIntent for restarting playback

This is to allow apps to set a PendingIntent to restart playback. This
is not persisted across reboots but will allow music to start playing
again for the life of the system. Only the most recent priority app with
a PI set will be cached. This also deprecates methods in AudioManager
that do this and unhides the unregister method in MediaSessionManager.

Change-Id: I66fbf5856333468d8cb8a3022809778ba00d426e
/frameworks/base/media/java/android/media/AudioManager.java
351346092acdfbfcc1d9ebf98d539d2a1196c5e8 25-Jul-2014 John Spurlock <jspurlock@google.com> Volume: Show safe media warning in settings.

If the safe media warning is enabled, make sure
we display it from the new inline slider preference in
Settings (without showing the volume dialog itself).

Also:
- Update the warning dialog to the new sysui theme.
- Separate the warning sentences with an additional line.
- Fix the auto-dismiss timeout.
- Add a system property to additionally enable the safe
media warning for testing
- Add more information to audio service dumpsys.

Bug:15434662
Change-Id: I95fec12c9049bbfdb7ebdf246160e4b12c0c5be3
/frameworks/base/media/java/android/media/AudioManager.java
289cc8e887f786f557faab226a1e01abb9a632a6 19-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> API for audio session ID generation

Expose the value used by the framework to generate an audio
session ID when a value isn't known.
Rename allocateAudioSessionId() to generateAudioSessionId()
as this operation doesn't "allocate" anything, and there is
no allocated resource to free after this operation.

Bug 16401631

Change-Id: I7a7bc05b39ea0b024ff225254eb755a9c85a2ad9
/frameworks/base/media/java/android/media/AudioManager.java
0daab220b2379aad33321364e8a39d2e3d4c3551 19-Jul-2014 Jean-Michel Trivi <jmtrivi@google.com> Hide AudioManager.startBluetoothScoVirtualCall()

Not intended for public consumption.

Bug 16401631

Change-Id: I299a4719fef57a66a428ccf1902aefaf59d7e064
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
3c45c29109d23981d8b707c809b3b43ce2e20fc3 09-Jul-2014 RoboErik <epastern@google.com> Pipe volume keys to adjustVolume instead of sendMediaKeyEvent

We were calling sendMediaKeyEvent with a KEYCODE_VOLUME key, which was being
ignored because it's not a media key. This redirects the volume keys to use
the adjustVolume methods instead. It also sends the appropriate flags to
make the lock screen consistent with the home screen and the volume keys
only affect active playback when the screen is off.

bug:15900519
Change-Id: I9f3853a2385869353a58debae6e6ca9933ba06ce
/frameworks/base/media/java/android/media/AudioManager.java
0543b17e84f970751d12bf8cd9fb8c8f22b1f52b 09-Jul-2014 Terry Heo <terryheo@google.com> Merge "AudioSystem: add definition for loopback input device"
112c19ee8b459439c3462767199832e5394b37a8 07-Jul-2014 Terry Heo <terryheo@google.com> AudioSystem: add definition for loopback input device

Bug: 15437484
Change-Id: I91d88d476693e9b9a72799f3c52a659a5843e446
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
ba207e76b2c5ebc01ececff351107d19a3134f3a 16-May-2014 Eric Laurent <elaurent@google.com> AudioManager: add isVolumeFixed() API

Indicates if the device implements fixed volume policy.
In this case, volume control APIs are not operational.

Bug: 11430859.

Change-Id: Ia82bdfe5b38d6b2ce132f00a493e6a04cb794ea0
/frameworks/base/media/java/android/media/AudioManager.java
19c9518f6a817d53d5234de0020313cab6950b2f 24-Jun-2014 RoboErik <epastern@google.com> b/15729204 Pipe sessions through to VolumePanel

When remote volume is changed via volume buttons we need to notify
the system UI so it can show the slider. This also passes it the
controller to use so adjustments to the slider are sent back to
the correct session.

Change-Id: If5847bcd5db16c56e0e9904b88c94e5b28954c41
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
ff0d9f098e51c54e1a030ed21fd980680cb7b405 10-Jun-2014 Eric Laurent <elaurent@google.com> AudioTrack: Add support for compressed audio

Add AudioFormat encoding definitions for compressed audio
and modify AudioTrack to accept compressed audio data.

Bug: 9428304.

Change-Id: Ib85a4d0d78af45924328f4d2d2ffebe83f4a00c5
/frameworks/base/media/java/android/media/AudioManager.java
d7c29189aa639bfac1e6efcd222e65c2c8ecf3f1 27-May-2014 Wonsik Kim <wonsik@google.com> TvInputHardware: Integration with audio framework changes

TvInputHardwareManager detects AudioPort specified by tv_input and
connect source to sink via AudioManager.createAudioPatch().

Bug: 15177175
Change-Id: I2252eb0df2d8287889ed28cc7d76dc1a659fd08b
/frameworks/base/media/java/android/media/AudioManager.java
430fc48865e5a371b08f180390946b96d73848fe 13-Jun-2014 RoboErik <epastern@google.com> Work on removing non-session media routing code

Change-Id: I73e7d22f2f8772c7b07ccf32d962161d79d5db74
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
b41ed6ca70984f0696f85e1608306f00f60875d9 12-Jun-2014 RoboErik <epastern@google.com> am 8c4b4dc8: Merge "b/15330955 Make RemoteController use the new session APIs" into lmp-preview-dev

* commit '8c4b4dc87f68d13331d67f4a25480455a7fb2378':
b/15330955 Make RemoteController use the new session APIs
73e23e229dd1a2d25687b1c6a63c708665378e41 11-Jun-2014 RoboErik <epastern@google.com> b/15330955 Make RemoteController use the new session APIs

This moves RemoteController over to using Sessions instead of
the RCC/RCD framework. This also adds several hidden APIs to
help with translating between the two apis.

Change-Id: I0f50313db2b6190b16fa86ce670ac9250654ca05
/frameworks/base/media/java/android/media/AudioManager.java
8a21f5dd79e93aa4e4b08ab4f33b9255d7c06961 06-Jun-2014 Jean-Michel Trivi <jmtrivi@google.com> AudioManager: add ability to allocate a new session ID

Expose method to allocate a new session ID.
Make the generic error code public.

Change-Id: Iec93548292845e3a1b1a97be9bbe54e9fcf06f2d
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
7d10873c5c75baedfeafed63c9111c8785b3cd17 04-Jun-2014 Eric Laurent <elaurent@google.com> am dd76759d: Merge "AudioManager: fix AudioPort gain query" into lmp-preview-dev

* commit 'dd76759d3e279cd56d6b1ce16a0b9488af35e0ab':
AudioManager: fix AudioPort gain query
b4e0909fc4fb08f513cb2b39a919b189621be87c 03-Jun-2014 Eric Laurent <elaurent@google.com> AudioManager: fix AudioPort gain query

Fix bug causing AudioPort.gain(int) to always return null.

Also removed debug log from AudioManager.

Bug: 14815883.
Change-Id: Ie65bab233ec8b4d974061e11ec5b8f0de18275d9
/frameworks/base/media/java/android/media/AudioManager.java
830fd7036e7287df90d1889a43f6f8d3560c48bd 02-Jun-2014 RoboErik <epastern@google.com> am c7ed6f69: Merge "Minimum work to make volume handling work with sessions" into lmp-preview-dev

* commit 'c7ed6f69d474f23df89d36ed94ff0062daa8dcbc':
Minimum work to make volume handling work with sessions
e78755e180c4f29ccc324112286dd81ab2016c40 02-Jun-2014 RoboErik <epastern@google.com> Merge "Minimum work to make volume handling work with sessions" into lmp-preview-dev
41792644d911f88e48ee7a9e34e6ddfbf35b46ef 01-Jun-2014 John Spurlock <jspurlock@google.com> am bfea31fd: VolumeZen: Prevent raising ringer volume in silent mode.

* commit 'bfea31fd6dd88c94deae1122874b4e0737380d25':
VolumeZen: Prevent raising ringer volume in silent mode.
a11b4affcad3d255aa723a89b768ea222506f2e8 01-Jun-2014 John Spurlock <jspurlock@google.com> VolumeZen: Prevent raising ringer volume in silent mode.

Instead of breaking out of silent mode when raising the volume
using the keys, prevent the change and display a visual hint up
in the user interface.

Bug:15330217
Change-Id: I74aae44319aadcd6db9841c7799967607f5a1617
/frameworks/base/media/java/android/media/AudioManager.java
3ed851bd07867fe41c5c9c2a9421da0b92ae1c6e 31-May-2014 Eric Laurent <elaurent@google.com> am f2e19a36: Merge "AudioManager: add audio port gain control" into lmp-preview-dev

* commit 'f2e19a36973331bbc09284993f772bf6981c10da':
AudioManager: add audio port gain control
086995c6dae73f2fa30e647c90ca6247c7982ea5 31-May-2014 Eric Laurent <elaurent@google.com> am b4499f84: Merge "audio routing update listener" into lmp-preview-dev

* commit 'b4499f84605faf06479cbb793e945d0af50fdead':
audio routing update listener
ec2f4b0aece1583f3e3f5c449ca107d6f7e915e1 31-May-2014 Eric Laurent <elaurent@google.com> am 47615317: Merge "AudioSystem: added JNI for routing extensions" into lmp-preview-dev

* commit '476153173b5a1b6b1fb5fc41af8b87d7e1ec36b3':
AudioSystem: added JNI for routing extensions
3a24199a0fe9479802ff6096d82cb3745efa1f1f 20-May-2014 Eric Laurent <elaurent@google.com> AudioManager: add audio port gain control

Implement AudioManager.setAudioPortGain() API.

Bug: 14815883.

Change-Id: Ib54bd1fd1392c474f4767a00228b0a617c51ec5e
/frameworks/base/media/java/android/media/AudioManager.java
700e73471d85348b52ecf213c36bb24b93997ec7 03-May-2014 Eric Laurent <elaurent@google.com> audio routing update listener

Implement audio port and audio patch
callback infrastructure for clients to receive
notifications when audio routing changes occur via the
OnAudioPortUpdateListener interface.

Bug: 14815883.

Change-Id: I32cbba64eca7369871aec235ff100de1f0c2d344
/frameworks/base/media/java/android/media/AudioManager.java
b69681c894c663e84f2826d9b0c832ceb9b45047 20-May-2014 Eric Laurent <elaurent@google.com> AudioSystem: added JNI for routing extensions

Bug: 14815883.

Change-Id: Ia0c0d14a8e3051a4bc0ce502b6e979135b170c97
/frameworks/base/media/java/android/media/AudioManager.java
b69ffd4dc2c8fa85e0064151141ebeee90de471e 30-May-2014 RoboErik <epastern@google.com> Minimum work to make volume handling work with sessions

This is the minimum change to make adjusting volume work with
MediaSessions. This only affects adjusting the volume and adjusting
the volume with a suggested stream. Adjusting a specific stream or
setting a specific stream will still use the same code.

This does not fix existing remote volume handling in RCC, which
will require a separate change to MediaController.

Change-Id: I5b957ff4bece1ee11e2364e1f216e1c08343c983
/frameworks/base/media/java/android/media/AudioManager.java
0abcc5a0bbf2ad6b70b461cec150b70cfe55d239 19-Feb-2014 Eric Laurent <elaurent@google.com> DO NOT MERGE - AudioManager: audio routing extensions

Added API and classes allowing framework components
to have direct control over audio routing and volumes.

Change-Id: I28225a6ebad86a7836e1ed749d93c0e964e215f1
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
a198a29250acb7c3e918f1566727190966bb336f 19-Feb-2014 Eric Laurent <elaurent@google.com> AudioManager: audio routing extensions

Added API and classes allowing framework components
to have direct control over audio routing and volumes.

Change-Id: I28225a6ebad86a7836e1ed749d93c0e964e215f1
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
c0e439f1b7dcd937b6cc842eafc7a4e7c8abce9b 20-May-2014 Eric Laurent <elaurent@google.com> Merge "AudioSystem: add new audio device definitions"
948d32748caaac5be06c991ebf00f74265a7849f 17-May-2014 Eric Laurent <elaurent@google.com> AudioSystem: add new audio device definitions

Change-Id: Ib7675bc33771365b2dbb7694c522469317b11457
/frameworks/base/media/java/android/media/AudioManager.java
8a2cfc309ab9126e90022916967c65a793c034f0 16-May-2014 RoboErik <epastern@google.com> Move media key processing to sessions

Send all media key events over to the MediaSessionService instead
of AudioManager. This does not affect volume handling yet, so it
is possible to get into a state where volume will be handled by
a different thing than media buttons. Except for corner cases
this shouldn't be noticable.

Change-Id: I00a576175d9c82937f0836e509b9a98d5cb77b83
/frameworks/base/media/java/android/media/AudioManager.java
f1372428f2df781c71c71caa2f6a4db6f847cf10 23-Apr-2014 RoboErik <epastern@google.com> Add Session API calls to RCC and AudioManager

This makes RCC and MediaButtonReceiver (via AudioManager) also use the new Session APIs in parallel to their existing code. This will allow us to bring up the Session compatibility pieces without disrupting the old behavior and then switch everything over to just using the new APIs when ready.

Change-Id: I33ce0a044dea3ec763f2302b91a5e415be27d4a4
/frameworks/base/media/java/android/media/AudioManager.java
6090995951c6e2e4dcf38102f01793f8a94166e1 19-Nov-2013 John Spurlock <jspurlock@google.com> Remove unused imports from frameworks/base.

Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
8ab8c2d06185dfefb5c69e614271f684e77eef63 29-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Cache RemoteController artwork bitmap size, use it in registration

Allow an app to set the artwork configuration at any point
regardless of the registration state, and cache the width/height
values.
If the RemoteController is already registered, apply them.
If the RemoteController is not registered, use the cached value
when the object gets registered.

Bug 10862527

Change-Id: If633e2b9383e7d59690288d2271113e98b195cd8
/frameworks/base/media/java/android/media/AudioManager.java
a83487e8c618f3c267c3fe3a72d4eb9f1388d07e 18-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Public API for RemoteController

Public API, under system|signature permission for access to
currently playing metadata and playback state.
Public API for sending media key events.

Bug 8209392

Change-Id: I39b9309ca3fb1bc305492bad98740df0ae0842b2
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
95a181397dad3113b96e3cc7392a5b0f5d742f39 12-Sep-2013 Eric Laurent <elaurent@google.com> Merge "Add HOTWORD as an AudioSource" into klp-dev
95d785346b4dae808a2d8f77356175e55a572d96 11-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10688644: Java crash in com.android.phone:

java.lang.SecurityException: Operation not allowed

There was a situation I wasn't taking into account -- components
declared by the system has a special ability to run in the processes
of other uids. This means that if that code loaded into another
process tries to do anything needing an app op verification, it will
fail, because it will say it is calling as the system package name but
it is not actually coming from the system uid.

To fix this, we add a new Context.getOpPackageName() to go along-side
getBasePackageName(). This is a special call for use by all app ops
verification, which will be initialized with either the base package
name, the actual package name, or now the default package name of the
process if we are creating a context for system code being loaded into
a non-system process.

I had to update all of the code doing app ops checks to switch to this
method to get the calling package name.

Also improve the security exception throw to have a more descriptive
error message.

Change-Id: Ic04f77b3938585b02fccabbc12d2f0dc62b9ef25
/frameworks/base/media/java/android/media/AudioManager.java
357263da0ec2bc2be9d48c1becc3d94288c2f3ed 09-Sep-2013 Eric Laurent <elaurent@google.com> Add HOTWORD as an AudioSource

- This is a low-priority source that can be preempted by others
- This is required for scenarios where someone wants an alway-on
graceful microphone

Bug: 10640877.

Change-Id: Idb3577541103717cb713a7a93d3762ad2c2f4710
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
5a0cf7a27f3953a1266af48543ccd9024f4cd89f 19-Jul-2013 John Du <johnldu@google.com> Adding support for Absolute Volume

Change-Id: I7bbc6f9296221ca219a50a5e377ebac9dcf5a407
/frameworks/base/media/java/android/media/AudioManager.java
9171db279826ee91d64eb9538a504ffed5e53b38 01-Aug-2013 Jean-Michel Trivi <jmtrivi@google.com> Unhide android.media.AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE

Unhide android.media.AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
Update android.media.AudioManager.requestAudioFocus() javadoc for the
new focus type.

Bug 8251963

Change-Id: I7cd69faaf5f0169ee462b91d0aaa75dc6b092107
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
cacfe69b6845dd1c1c8682f67c3c52ef35214b2c 12-Jul-2013 Justin Koh <justinkoh@google.com> Add FX_KEYPRESS_INVALID constant to AudioManager.

Add FX_KEYPRESS_INVALID constant to AudioManager. This is a sound which should
play if the user tries to click or press on an element which is disabled.

Change-Id: Idd8953abeddd1afb51f7f190f9fb612ef672defa
/frameworks/base/media/java/android/media/AudioManager.java
61dcdf3764b614c6f01e77cb4342d192e3101f8a 26-Jun-2013 Oliver Woodman <olly@google.com> Expose latency methods through AudioManager and AudioTrack.

There's a longer term plan to fix audio/video sync, but
this gets the Java level to parity with the native level,
and allows applications in Java to achieve sync in the
same way as the native media player. APIs are left as hidden
for now.

Change-Id: Iaf70baac1ffb50ef48e03355163158568fbd0fe9
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
961cae92540763226648813d111c5b5c3b0f1597 20-Mar-2013 Dianne Hackborn <hackbod@google.com> New media button API.

This allows sending media buttons to any PendingIntent,
so they can be captured with a registered receiver.

Also add some new ViewTreeObserver APIs; this is all for
a new support library API to watch media buttons while an
app has input focus.

Change-Id: I3c51cef59460662b008c9a2cc87d6a6383c21855
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
aac753dcf8862b416773eabaabb9d938a30f5896 22-Feb-2013 John Spurlock <jspurlock@google.com> DO NOT MERGE - Small documentation fix for AudioManager.java

Correct typo + copy-paste description issue.

Cherry-pick of CL Idce7cfeb7255d96aef91efc40d19f077dde3e9a5 from
master.

Change-Id: I1b6f378d58eafdd4a265672a12189273b41f72d6
/frameworks/base/media/java/android/media/AudioManager.java
679d5046f245ea8b39f9b5596195f3468808dd54 05-Feb-2013 Jean-Michel Trivi <jmtrivi@google.com> Add support for querying whether the music stream is active remotely

Bug 7485803

Change-Id: I554b44bd35b017fa4030a0d89779066c96594f2b
/frameworks/base/media/java/android/media/AudioManager.java
d677054ca63f55abaa1c478ea3c50f6be665a979 10-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Don't play notifications during speech recognition

Add support for querying AudioManager to know whether speech
recognition is currently underway.

Don't play a notification if speech recognition is underway.

Bug 7314859

Change-Id: I1bd013a3168cfe1a6b6dcfd28565e1c3c512eb6a
/frameworks/base/media/java/android/media/AudioManager.java
c6c4365ddb0213c548b055f257dc8077389224fb 25-Sep-2012 Glenn Kasten <gkasten@google.com> Implement android.media.AudioManager.getProperty()

Bug: 6635041
Change-Id: I0e7d53b99559cdc89f2f107f23048e4b1a8dd383
/frameworks/base/media/java/android/media/AudioManager.java
4bbcc6549738f3d69831b2bd9eb4accec3e9920e 24-Sep-2012 Eric Laurent <elaurent@google.com> Display a fixed volume silder when docked.

Align UI indication to volume policy when docked: the music volume
cannot be adjusted when docked or connected to HDMI. Display
a disabled slider at max volume in this case to be consistent.

Bug 4335692.

Change-Id: I6f8db143b0e2ecf54e4bdacd88afdeb661a98a18
/frameworks/base/media/java/android/media/AudioManager.java
62796aac596f556a1871358bb8ce93af9d55c5a5 20-Sep-2012 Glenn Kasten <gkasten@google.com> Expose android.media.AudioManager.getProperty()

Also fix minor documentation errors.

Bug: 6635041
Change-Id: I6bbbf1b7c5ab705ac374436ea0c098cb3c27fd4a
/frameworks/base/media/java/android/media/AudioManager.java
228c9847a31b79f8baa80302731cdbf6a2b3c0d4 14-Sep-2012 Glenn Kasten <gkasten@google.com> New API for querying audio properties

Bug: 6635041
Change-Id: I66e87c75af7c84cdb23cb25a958e79bba8e53baa
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
629f051f7d061f4db4a174dbd267a96f0c8113df 19-Jun-2012 Jean-Michel Trivi <jmtrivi@google.com> am 586b8ee6: am 2f442304: Merge "Remote volume handling" into jb-dev

* commit '586b8ee62e0245e3c88ce9db51e1c1c3b4f1fb2c':
Remote volume handling
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/AudioManager.java
2c0044410ee30bdba19870931374338b36c33ce9 18-Jun-2012 Eric Laurent <elaurent@google.com> am 9686f24c: am c4f4b0f0: Merge "AudioManager: back to old setBluetoothA2dpOn()" into jb-dev

* commit '9686f24ce3d13446393a468fb3f52283bf2bc80d':
AudioManager: back to old setBluetoothA2dpOn()
242b33870b51ea962a1d5c077d71c648eccc2b7a 15-Jun-2012 Eric Laurent <elaurent@google.com> AudioManager: back to old setBluetoothA2dpOn()

Come back to old versions of setBluetoothA2dpOn() and isBluetoothA2dpOn().

MediaRouter will call methods on IAudioService directly.

Change-Id: I18f0a3106bad78715ed11a6b7b4ec1d656cdae41
/frameworks/base/media/java/android/media/AudioManager.java
846890957deb38463acdc98112ed90b44290aa0c 31-May-2012 Eric Laurent <elaurent@google.com> am c383b407: am cee7203f: Merge "Send device connection intents from AudioService" into jb-dev

* commit 'c383b407ad24474b87de68f93ea95de495f6d2c1':
Send device connection intents from AudioService
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/AudioManager.java
c0ed6efe5f9b3c06a1297592647bd52a0f84215a 25-May-2012 Christopher Tate <ctate@google.com> am 115284bc: Merge "Support volume-changed sounds on master-volume-only configs" into ics-aah

* commit '115284bc124ce2874f32ad36956f475959513388':
Support volume-changed sounds on master-volume-only configs
c4b78d206ffcdccac01e3436a4a3462bef9672ed 22-May-2012 Christopher Tate <ctate@google.com> Support volume-changed sounds on master-volume-only configs

Some products manipulate only the master volume, and the existing
code does not play volume-change tones when the master volume
is adjusted. This CL includes some config-driven behavior that
will play those tones (via the system stream) if desired.

Bug 6498986

Change-Id: I2415773325d0a0039efc67897bc371b1f2e18063
/frameworks/base/media/java/android/media/AudioManager.java
aa5481214f01b9e9cb4fa8ad25f68abedde785f3 24-May-2012 Eric Laurent <elaurent@google.com> am dcc752a8: am 90fb2dd6: Merge "AudioManager: restore setBluetoothA2dpOn() method" into jb-dev

* commit 'dcc752a8984361ba23da00bf2adeec4161b67af2':
AudioManager: restore setBluetoothA2dpOn() method
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/AudioManager.java
eafa73e4dce655bf63da4a43cbb395efea31aafe 21-May-2012 Jean-Michel Trivi <jmtrivi@google.com> am 1644f0d9: am 0a95ce9f: Merge "Handle media button events during phone calls and when ringing" into jb-dev

* commit '1644f0d9ee72cf37f0b92a7b5ef44bfac1421bab':
Handle media button events during phone calls and when ringing
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/AudioManager.java
f131611d038cdcfb441f99516672fdd175a68476 04-May-2012 Christopher Tate <ctate@google.com> resolved conflicts for merge of b89ce434 to master

Change-Id: Ida7ef25adc2f4b9f22d8662c9f0e8a1ec9df0d55
b89ce434993cca883818ab38f98c0b29d77e7aa2 04-May-2012 Christopher Tate <ctate@google.com> Add streamlined config-based path for no volume key sounds

This lets us avoid a Binder roundtrip to the system process during
volume changes. Previously volume change would be staged at key-down,
then applied at key up in tandem with playback of the sonic feedback
about volume key presses. The reason for this two-stage handling was
to defer playback of the sound [at the target volume] while the volume
key was being held for repeat.

On some devices volume is always sent as key down/up pairs rather than
down-repeat-up sequences. On these devices it is more efficient to
apply the new volume immediately during down handling, and have the
up handling be a no-op. This CL adds a configuration resource item
selecting this new fast path.

Bug 6433943

Change-Id: Icffa56e958243b841d514e2fe4609ba3a7b20f14
/frameworks/base/media/java/android/media/AudioManager.java
cd1cd73baec1f93d21f67fdded5466e507431eba 01-May-2012 Eric Laurent <elaurent@google.com> AudioManager: deprecate vibrate settings

Deprecate methods, intent and constants related to vibrate
settings management: getVibrateSetting(), setVibrateSetting(),
shouldVibrate() ...

According to new vibrate/notification policy, applications should
maintain their own vibrate settings.

Issue 6036529.

Change-Id: I99bcef2c5f602131f1d9b0222f7fb39f3bbef823
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
59f482764e346a5c5ac118ee1f7b24da645c2559 06-Apr-2012 Eric Laurent <elaurent@google.com> Added support for USB audio devices

Two types of USB audio devices are defined:
- USB audio device: the audio device in USB device mode while
the Android device is in USB host mode.
- USB audio accessory: the audio device in USB host mode while
the Android device is in USB device mode.

Renamed intents for analog and digital docks to avoid confusion:
- ACTION_USB_ANLG_HEADSET_PLUG to ACTION_ANALOG_AUDIO_DOCK_PLUG
- ACTION_USB_DGTL_HEADSET_PLUG to ACTION_DIGITAL_AUDIO_DOCK_PLUG

Factorized code in AudioService broadcast receiver.

Change-Id: I1b6d0257a9d68ecb9495c78c98bac8c67fec7891
/frameworks/base/media/java/android/media/AudioManager.java
1c35d117f01b5a6f66b82c57eb29350f16694070 05-Apr-2012 Justin Koh <justinkoh@google.com> am db9b114b: Merge "Adds flag argument to setMasterMute." into ics-aah

* commit 'db9b114b2e1f9c2034c3cd6df00245b039d90c28':
Adds flag argument to setMasterMute.
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/AudioManager.java
6c798970ccb8759d1e613b57111daa8da0ab44c7 02-Mar-2012 Lei Zhang <rzhang@google.com> Add batch volume adjust support to adjustMasterVolume() in AudioManager and
AudioService.

Change-Id: I09b1dfc93f14ca836e1ba2a400c00caed01fd541
/frameworks/base/media/java/android/media/AudioManager.java
d674dd50b7caf57aa8c9e7e4bc75c92d5f576167 02-Mar-2012 Lei Zhang <rzhang@google.com> Add batch volume adjust support to adjustMasterVolume() in AudioManager and
AudioService.

Change-Id: I34382839622a5cc5f2a8768aed011e8224cadff9
/frameworks/base/media/java/android/media/AudioManager.java
e3f5979307fa52898459d9d09ee11bc1d65a4f7f 25-Jan-2012 Jason Simmons <jsimmons@google.com> Make AudioManager.adjustMasterVolume public and hidden
/frameworks/base/media/java/android/media/AudioManager.java
0dc37cce9d564ae43883c8dc8672b9266b881e63 01-Dec-2011 Mike Lockwood <lockwood@google.com> AudioService: Send broadcasts when master volume and mute state change

Signed-off-by: Mike Lockwood <lockwood@google.com>
/frameworks/base/media/java/android/media/AudioManager.java
fa7b06147c2d0f0c64fa334ed5a971cbad7cdbe5 16-Nov-2011 Mike Lockwood <lockwood@android.com> AudioManager: Add wrapper methods for master volume support

Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/media/AudioManager.java
ce952c8e13c535bedde77bcdb94dfcc7508475aa 14-Nov-2011 Mike Lockwood <lockwood@android.com> AudioManager: Add support for master mute

Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/media/AudioManager.java
4767690f09ea3447b8c5c32fb28d27650aa18e00 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

Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/media/AudioManager.java
8dc1dabd254249b7ddb8743e88fdb96580ffc585 27-Oct-2011 Mike Lockwood <lockwood@android.com> VolumePanel: Add support for master volume

Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/media/AudioManager.java
cbdb49dc5e1b993a0bc5c68dbfb9486bfa0cd762 20-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/AudioManager.java
30c918ce7fbe171944b28fc91b3f22b3d631872d 11-Nov-2011 Glenn Kasten <gkasten@google.com> Use final on new member variables

Use final for member fields initialized to a new and that are never modified.

Change-Id: I042352c7bc21879613e7a50b1205b6923f8083cf
/frameworks/base/media/java/android/media/AudioManager.java
4dd3674e517051f130fef36d2eb201c68ff61094 24-Jan-2012 Jean-Michel Trivi <jmtrivi@google.com> Bug 5567648 disassociate audio mode and audio focus

Don't automatically change the audio focus when
the audio mode changes. This is best handled by the
applications that change the audio mode so they
can address their usecases as they please (for
instance to define the behavior when switching calls).
Replaced the implicit "mode to focus" behavior with
two methods to request and abandon audio focus. These
methods are only to be used by the framework, and maintain
the logic in AudioService to prevent other apps to request
audio focus during a call.
A susequent change will update com.android.internal.telephony.CallManager
to take advantage of these two methods.

Change-Id: If84ebd508e985083e8cac82ece44940c72b5c669
/frameworks/base/media/java/android/media/AudioManager.java
db8b292b6d83e360d944fd8342c82d8b7bd1facd 25-Jan-2012 Jason Simmons <jsimmons@google.com> Make AudioManager.adjustMasterVolume public and hidden

Change-Id: Ied4d07c2f67f24d1e1963f4ff30650042334d563
/frameworks/base/media/java/android/media/AudioManager.java
b782e8d71e693984cc5236f1cf08e0c3c11a4050 13-Dec-2011 Joe Onorato <joeo@google.com> logging

Change-Id: I6fde5617365f479884937615e0d3f0f4ecc2dc14
/frameworks/base/media/java/android/media/AudioManager.java
3309386a1b62095ab91b5efe4e8aa5dbd8ea5066 01-Dec-2011 Mike Lockwood <lockwood@google.com> AudioService: Send broadcasts when master volume and mute state change

Change-Id: I7eb5041f0c14f419317e29ea6fa7faa9159cf165
Signed-off-by: Mike Lockwood <lockwood@google.com>
/frameworks/base/media/java/android/media/AudioManager.java
d62da2d0da976ea5590471c3b70ebf013e41ce8b 02-Dec-2011 Jean-Michel Trivi <jmtrivi@google.com> Remove unused variable and imports in AudioManager

Remove unused imports.
Remove private mHandler variable: it was assigned a new Handler
object but was never accessed.

Change-Id: I63cd08aa38701ea157fef7d3185a58a6e2a95822
/frameworks/base/media/java/android/media/AudioManager.java
c614df96507229eda13c029176ecc8f424a9854b 16-Nov-2011 Mike Lockwood <lockwood@android.com> AudioManager: Add wrapper methods for master volume support

Change-Id: Ibfc24f052d05824175f71c2138ba041c94c3def7
Signed-off-by: Mike Lockwood <lockwood@android.com>
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
466ade5ad66e7bfb1814d5e5ac76a17f8a0bcd3a 01-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 5045498 Unhide Remote Control Client API

The RemoteControlClient API enables media application to have
information such as album art, current song, playback state
be displayed on "remote control displays", as well as be
controlled by "remote controls".
The new API consists in:
- a new class, RemoteControlClient
- new methods in AudioManager to register a RemoteControlClient
- a new class, RemoteControlClient.MetadataEditor to edit and
apply the information associated with a RemoteControlClient,
and which will be displayed on a "remote control display"

Change-Id: I5616085e4ad58ce0bbc1a5953b0a5a28d32f8703
/frameworks/base/media/java/android/media/AudioManager.java
44413e5b514a91806a4bb4c7780029ea43be6f81 24-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5045498 Single binder call when metadata and artwork are updated

When metadata gets applied, optimize the artwork and metadata
update by doing it in a single call.

Add missing RemoteControlDisplay-related methods in AudioManager.

Change-Id: I97aa802cc480327bee5592ea8dfdbd414c0f037a
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
59df720668938be62e6cff6df781c88f23ea42c7 16-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Bug 5045498 javadoc for the remote control client API"
fcd693a21d862ea765006f8987b8dd4b125b28c5 11-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5045498 javadoc for the remote control client API

Change-Id: I2a8aeffd94c4f9e93a1be459be8e45d595438f38
/frameworks/base/media/java/android/media/AudioManager.java
0a9faa8cf934ef38319cd945b600825c6bb88b9c 15-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5045498 Send media button event receiver to remote control

When notifying the remote controls of an update, also pass the
associated media button event receiver.

Change-Id: I9125378653ce21e3bd672b936df638c0c6154edb
/frameworks/base/media/java/android/media/AudioManager.java
497b3fe7257d5bbee7762455c6988915bde21601 03-Aug-2011 Eric Laurent <elaurent@google.com> Issue 5081351: isWiredHeadsetOn() permission.

AudioManager.isWiredHeadsetOn() should not require permission MODIFY_AUDIO_SETTINGS.
Remove permission checks on all getters in audio policy manager as permission enforcement
is really usefull for setters.
Also deprecate AudioManager.isWiredHeadsetOn() which name and implementation are deceptive.

Change-Id: I38f8df7c26c0d417bf0e2b74e4c11c2d143f2ecd
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
72668b2c040b581b298b069f3b5af5ed7f212d89 20-Jul-2011 Eric Laurent <elaurent@google.com> Fix issue 4499450: Unknown Ringer Mode

Added a validity check on ringer mode values in AudioManager.setRingerMode().

Change-Id: Ie780edc1d347009d90f000018a71520b04e0c4a1
/frameworks/base/media/java/android/media/AudioManager.java
dc03c61fe3cd8d0805480e48a974986439977a60 01-Apr-2011 Eric Laurent <elaurent@google.com> Bluetooth SCO audio API improvements.

The AudioManager API to control bluetooth SCO did not provide an easy way for
applications to handle SCO connection errors. When a request to activate SCO with
AudioManager.startBluetoothSco() failed, no state change was indicated via
AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED intent. The application had to
implement a timeout to handle connection failures.

The API change consists in defining a new intent AudioManager.ACTION_SCO_AUDIO_STATE_UPDATED
and deprecate AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED. The new intent
will broacast a new state CONNECTING when the SCO connection is initiated.
The application can monitor changes from CONNECTING to either CONNECTED or DISCONNECTED
states to detect connection success or failure.
An extra indicating the previous state is also added to the new intent.

Also improved BluetoothHeadset service management in AudioService. A disconnection
from the service is not considered as a device or SCO link disconnection. Instead, if the
service interface is not present when a request to activate SCO is received, an
attempt is made to reconnect to the service.

Change-Id: I005fda1caaf74bb7de64fece44e9c7e628e828db
/frameworks/base/media/java/android/media/AudioManager.java
43a17654cf4bfe7f1ec22bd8b7b32daccdf27c09 07-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These haven't been working since before 1.0.

Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
/frameworks/base/media/java/android/media/AudioManager.java
8b4b97a14ad9b5b982d8fe92755efabec8ad0076 04-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3352047 Wrong message when adjusting volume

Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
/frameworks/base/media/java/android/media/AudioManager.java
402f7f29634a9f68e7929be828a927a3e2f5efe9 04-Feb-2011 Eric Laurent <elaurent@google.com> Fix issues 3425035 and 3423785.

- Make sure that STREAM_MUSIC is affected by ringer mode on non voice capable
devices whatever the saved settings say.

- Added a hidden method to AudioManager for VolumePanel to override
the stream selection logic while the panel is showing.

Change-Id: Ib2ff2a7af63decb4e29c45700c41e5058f79d877
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
8aa798b244e32e227bad97d40ddfd7d3557030a3 18-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Unhide android.media.AudioManager.MODE_IN_COMMUNICATION

Unhide new constant for an audio mode for a system state when
the device has a VoIP (as opposed to telephony) call established.
Update the setMode and getMode javadoc to link to the mode constants
that can be set or retrieved.

Change-Id: I90c4417679f215eb66e5305086fd077beddaa59c
/frameworks/base/media/java/android/media/AudioManager.java
8f677d66d9c3ba34c97e69b2bb9e161f129af0ee 15-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Add new audio mode for audio communications other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
call is currently underway. There was no way for audio video
chat or VoIP applications to signal a call is underway, but not
using the telephony resources. This change introduces a new mode
to address this. Changes in other parts of the system (java
and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
state variable directly, but to use two new convenience methods,
isInCall() and isStateInCall(int) instead.

Change-Id: Id744cd26520ea1d1a4795eabe6a1f0c58789af76
/frameworks/base/media/java/android/media/AudioManager.java
86f6786032b1a0380cf089aeeceef7e9d8982ef8 06-Nov-2010 Joe Onorato <joeo@google.com> Move the volume, media, call, camera and search key handling from
PhoneWindow to a new PhoneFallbackEventHandler class that is used
for all windows, not just ones with decors.

Bug: 3155146
Change-Id: Ib070fa3e523e3564b225bca576c08012fef4f416
/frameworks/base/media/java/android/media/AudioManager.java
c5c16f5f60f5091c29edb7d83a8fbc3e53b1ee7d 12-May-2010 Xavier Ducrohet <xav@android.com> am 6914e17a: am 08eff49f: am d9712b69: am b1235a57: Merge "Hide two audio focus methods." into froyo
1e438357f0db23d590501af3a3e3006684541c75 12-May-2010 Jean-Michel Trivi <jmtrivi@google.com> am 4f9c9aa8: am fd5a747f: am 0c73adb1: am 3e90c76c: Merge "Update javadoc in android.media.AudioManager to not hide the registerAudioFocusListener() methods." into froyo
9f7c4112acb06f7a2ec817c682202d469a13d547 12-May-2010 Jean-Michel Trivi <jmtrivi@google.com> am 11e26c28: am 9f35d39a: am ea37d9b4: am aaa01b18: Merge " Fix bug 2670395 and 2599698 When the user selects a "Silent" notification sound, the Uri encoded path is an empty string. Setting this Uri as the data source of the MediaPlayer used to play not
5f53f0883a507b9d4b9b9891af560a64f746d149 11-May-2010 Xavier Ducrohet <xav@android.com> Hide two audio focus methods.

Change-Id: I53ddf736892cde8edfaffa7d69dd9c234df52efa
/frameworks/base/media/java/android/media/AudioManager.java
46b3a1808a8e6fc60079af3c2292fd784a7bb0fc 11-May-2010 Jean-Michel Trivi <jmtrivi@google.com> Update javadoc in android.media.AudioManager to not hide the
registerAudioFocusListener() methods.

Change-Id: I8df37bd89df6f492aeb70fa636200552140578f9
/frameworks/base/media/java/android/media/AudioManager.java
392a2bbb52688ebd25768a7784d9edca7f498110 11-May-2010 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 2670395 and 2599698
When the user selects a "Silent" notification sound, the Uri encoded
path is an empty string. Setting this Uri as the data source of the
MediaPlayer used to play notifications caused the completion listener
to not be called, which with the AudioFocus logic causes the Music
app to pause and never resume. The NotificationPlayer modifications
cause the MediaPlayer for the notification to only request audio
focus when the data source is not empty.
The audio focus code in AudioService is defensively synchronized
against a unique lock, and the exception observed in bug 2670395
is explicitely caught in case another edge case wasn't caught by
this fix.
The AudioFocus handling in AudioManager is modified so only the
requestAudioFocus and abandonAudioFocus methods are meant to be
used, as registerAudioFocusListener and unregisterAudioFocusListener
provided no additional functionality over the request/abandon
methods. abandonAudioFocus() also removes the listener from the
map in AudioManager since after abandonning focus, the listener
would no longer be called.

Change-Id: I3b553ee8a8163c25e01117d7e5479dd5fdfa7c6b
/frameworks/base/media/java/android/media/AudioManager.java
5a3a3b16baba25f1f3f3be182a79b3ec691e8f8a 02-Apr-2010 Jean-Michel Trivi <jmtrivi@google.com> am 055897ac: am 28525488: am 9ab05fff: Merge "Fix bug 2565463 Ensure an object cannot appear twice in the AudioFocus stack. Enforce parameter check in AudioManager.requestAudioFocus() Typo correction in AudioService.unregisterMediaButtonEventReceiver()" into froyo
55d1bb3483e17a11d122e68044e552d96ab55ff4 02-Apr-2010 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 2565463 Ensure an object cannot appear twice in the
AudioFocus stack.
Enforce parameter check in AudioManager.requestAudioFocus()
Typo correction in AudioService.unregisterMediaButtonEventReceiver()

Change-Id: Iedd6081a2a096bd7effbaeb9f888a31691201b3b
/frameworks/base/media/java/android/media/AudioManager.java
7f9b1fa6719dde575f8ea9858313358733fbd6c9 31-Mar-2010 Glenn Kasten <gkasten@google.com> Add isSilentMode initially hidden before API council approval, test case to be added separately.

Change-Id: Id9384a2caf45b8775705cde6c990c3c65c7c6312
/frameworks/base/media/java/android/media/AudioManager.java
7f7e67f1b60b7840011236097baad9df6dd74c20 31-Mar-2010 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 2553575 API REVIEW: android.media Change 1 of 3
Notes from API Council review:
Rename onAudioFocusChanged -> onAudioFocusChange

Change-Id: I8296cc84381506dabe8a9ceb1b5e3c0ab6d4af25
/frameworks/base/media/java/android/media/AudioManager.java
bbbb1dc3c33f8fe3ed24bd0baacf1f196cb5addd 18-Mar-2010 Jean-Michel Trivi <jmtrivi@google.com> Unhide the MediaButton receiver API in android.media.AudioManager

Change-Id: Ic9222b0bf6e2ff481c6aa5f16ac0259fa7a52355
/frameworks/base/media/java/android/media/AudioManager.java
983ac2b8cff85dda1f55b0d7779a33248b3fa7cf 19-Mar-2010 Jean-Michel Trivi <jmtrivi@google.com> Unhide new constants used in AudioFocus API to denote a situation
where a new focus owner signals it allows other audio apps to keep
playing by ducking their audio streams.

Change-Id: I1109f44546f3cbcff8ad33ee21cfff50f4f12177
/frameworks/base/media/java/android/media/AudioManager.java
4b55d496dd9899731b26327e4cb71c9ef4a1137a 19-Mar-2010 Jean-Michel Trivi <jmtrivi@google.com> Fix SDK build Remove links to hidden constant in javadoc.

Change-Id: I21495f0ef64b3dc154ce0e0ca2d44686afd752e9
/frameworks/base/media/java/android/media/AudioManager.java
95b88fbe744d8ce53b5f54f6fcd90c55094a8d14 19-Mar-2010 Eric Laurent <elaurent@google.com> Attempt to fix the SDK build.

Change-Id: I024df1b513da117057a21c27e6c0cd134cdd8023
/frameworks/base/media/java/android/media/AudioManager.java
078fd47e91d495175927d1a4a8b9aad039a7ba4e 19-Mar-2010 Jean-Michel Trivi <jmtrivi@google.com> Support focus requests where ducking of the loser of audio focus
is acceptable for the new audio focus owner.

Change-Id: I965483f12eeb717115a8f6992d8f1ab7fafa4e45
/frameworks/base/media/java/android/media/AudioManager.java
c04cfa35968783f5af007db95680f0087201d9ea 18-Mar-2010 Eric Laurent <elaurent@google.com> Unhide AudioManager API to control bluetooth SCO audio connection.

Needed for issue 2416481 in order to allow unbundled applications to play and record
audio to/from a bluetooth SCO headset while not in call.

Change-Id: Ie1f96ded991e65da538c2c4a58bfa1e548d58a01
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
308e9a5d0975489982f93fd1f3728e6ed7a778d0 17-Mar-2010 Jean-Michel Trivi <jmtrivi@google.com> Fix bug where the ID stored for an OnAudioFocusChangeListener is an
empty string when audio focus is requested or abandonned with a
null listener.

Change-Id: I7709b75c6092aefc002806343298bc679d42d6c6
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
eabb6df2fac57134b82f90a63730b2371589bded 09-Mar-2010 Jean-Michel Trivi <jmtrivi@google.com> Unhide API additions to AudioManager for AudioFocus support.

Change-Id: Ifc7d764703632eb91db11587675ae70ec14510e8
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
9ce379aef155e0c21b5d82d8dc713c62792e4f30 16-Feb-2010 Eric Laurent <elaurent@google.com> Fix issue 2440226: Car dock volume synchronization.

AudioService now sends intent AudioManager.VOLUME_CHANGED_ACTION when the volume is changed
on any stream type (previously the intent was sent only for STREAM_BLUETOOTH_SCO stream).
A new extra for previous volume value is added to the intent.
/frameworks/base/media/java/android/media/AudioManager.java
6015a9715421a339c2b7bb63f9166504e3488179 12-Feb-2010 Eric Laurent <elaurent@google.com> Fix issue 2418668: AudioManager isWiredHeadsetOn() always returns false for headset without mic.
/frameworks/base/media/java/android/media/AudioManager.java
23f25cda0c73f8eb878844dea32fb0bd419edca2 25-Jan-2010 Eric Laurent <elaurent@google.com> Fix issue 2378022: AudioService should direct volume control to STREAM_VOICE_CALL stream when STREAM_VOICE_CALL stream is active.

Modified AudioService.getActiveStreamType() so that STREAM_VOICE_CALL is selected when a track using this stream
type is playing.

Chanded isMusicActive() for a more generic isStreamActive(stream) method in AudioSystem, IAudioFlinger and AudioFlinger.
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
a2ef57dba9ac77d8eccacd646b2b8a8d99fe9d8b 28-Sep-2009 Eric Laurent <elaurent@google.com> Fix issue 2141503: Keyclick sound doesn't honor volume settings.

Use music stream volume minus 3 dB for sound effects if volume is not explicitly requested by application.
/frameworks/base/media/java/android/media/AudioManager.java
fccb25d2074358c54d4c60eb321aeaa08a5de59a 16-Sep-2009 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 2115258 where the AudioManager javadoc doesn't warn against
misuse of some of the methods that should only be used to implement
the Settings and Phone apps, and the audio service.
/frameworks/base/media/java/android/media/AudioManager.java
9d85d5adf90e7363304e2d4a22d60a2114bb7ab9 03-Sep-2009 Eric Laurent <elaurent@google.com> Fix issue 2097083: STREAM_SYSTEM should be at max volume.

Changed default volume for STREAM_SYSTEM and STREAM_SYSTEM_ENFORCED to the maximum value.
/frameworks/base/media/java/android/media/AudioManager.java
4a51c20ce607c74914f90fd897f04080121ac13b 22-Aug-2009 Dianne Hackborn <hackbod@google.com> I am getting tired of the java doc warnings, so fix them.

Change-Id: I2205eebae419eaf4a0992c9f5b7cd807eb843fe1
/frameworks/base/media/java/android/media/AudioManager.java
5982013cfc8274ff0bafaba83c676b3a8890cba9 14-Aug-2009 Jared Suttles <jared.suttles@motorola.com> Change the number of volume steps from 6 to 7 per Verizon Requirements

Submitted on behalf of Helen Tran <Helen.Tran@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
d282ac8610f72d964105efefe41120a5340f1ce0 14-May-2009 Marco Nelissen <marcone@google.com> Findbugs fixes.
/frameworks/base/media/java/android/media/AudioManager.java
b9c9d260f21b321527c4622a123af9767630d94d 06-May-2009 Eric Laurent <elaurent@google.com> fix issue 1713090: After a Bluetooth call, MusicPlayer starts playing on speaker rather than wired external audio.

Temporary fix until audio routing is refactored in Eclair release:
- centralized and synchronized all audio routing control in AudioService.setRouting()
- deprecated AudioManager.setRouting() and AudioManager.getRouting() methods
/frameworks/base/media/java/android/media/AudioManager.java
105925376f8d0f6b318c9938c7b83ef7fef094da 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/frameworks/base/media/java/android/media/AudioManager.java
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/AudioManager.java
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/AudioManager.java
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/AudioManager.java
da996f390e17e16f2dfa60e972e7ebc4f868f37e 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
/frameworks/base/media/java/android/media/AudioManager.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/media/java/android/media/AudioManager.java
b798689749c64baba81f02e10cf2157c747d6b46 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/frameworks/base/media/java/android/media/AudioManager.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/media/java/android/media/AudioManager.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/media/java/android/media/AudioManager.java