History log of /frameworks/base/media/java/android/media/AudioManagerInternal.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/AudioManagerInternal.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/AudioManagerInternal.java
519c7744b522aa07e12bc3244ac3de14aa2a4ad0 18-Nov-2014 RoboErik <epastern@google.com> Handle volume events on master volume devices correctly

We weren't passing volume events to the master volume correctly on
devices that only use a master volume. This fix checks if the device
only has a master volume and adjusts the master volume instead of the
stream's volume if that's the case.

bug:18305790
Change-Id: Iec35e0a7dc59e6d73c9dfc88da324660bb15b1f3
/frameworks/base/media/java/android/media/AudioManagerInternal.java
272e161c1a200900cb10b5b0cdab8ae1f123cabd 05-Sep-2014 RoboErik <epastern@google.com> send volume button events to adjustSuggestedStream instead of adjustStream

This way the audio system can route the adjustments correctly when a bt
headset is connected.

bug:17281977
Change-Id: Ic41d038e47179baffc86e539562da285446148c7
/frameworks/base/media/java/android/media/AudioManagerInternal.java
0dac35af2c6aa42bcd181981b041747cfd1afa5f 13-Aug-2014 RoboErik <epastern@google.com> Pipe caller's identity through volume methods

setStreamVolume and adjustStreamVolume were always being called
from the session service's uid/package. This adds the plumbing to
allow the original app's info to be passed in to the audio service
when volume is changed.

Change-Id: Ib36639dab1e518b435161dc453c8ba9351df3e9b
/frameworks/base/media/java/android/media/AudioManagerInternal.java