This is an alternate to the submitted API which doesn't use the new
AudioAttributes class and just takes the AudioManager.STREAM instead.
Change-Id: I0365bc6fb9196fc33852ba6b202ca553efe0cc85
This adds RemoteVolumeProviders which handle volume change
events and a way to switch a session between local stream
playback and remote playback handling.
This also adds a way for an app to specify the PendingIntent
to launch when we want to show their ongoing playback UI.
Change-Id: I3a72bf2ec7ca55f61f50859ddc2988eebd491e9d
- 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
This renames several of the core session classes to be prefixed
with Media. It also adds @hide to all route references for now.
Change-Id: Idb42897d490cf24626e4e93ca975b2cb93ec054c
Regroup status code translation from native to JAVA in AudioSystem.
The same codes will be used by AudioTrack, AudioRecord, AudioManager
and defined in a single place in AudioSystem.
Change-Id: I7d3f39f30e3bb8e53f33f4408bcb0672df8af42b
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
Each user record maintains the list of sessions and providers that
are running under that user. Lifecycle for providers has been modified
to stop discovery when the user is no longer current but keep the
binder connection open so long as there's a session that has selected
a route from that provider. When a user is stopped all providers on
that user will be unbound even if they were still in use.
Change-Id: Iadf1efded3415f7ecf384d3a73513883de9c86b0
AudioAttributes is a class to associate a collection of attributes
describing information about an audio player.
Change-Id: I031aca1c79353abdfa0d7272c5dee0c2376c519a
This tags all sessions with the user id that they were created for. It
also adds API for creating and querying sessions for a specific user.
This does not wrap providers per user yet which will be done in a
separate CL.
Change-Id: Icdaf701b0614a95301657998602c45208d548c27
Javadoc for blocking/non blocking write modes was referring
to the old signature of one of the write methods.
Change-Id: Ie919e3e0a976b0c915dacd490ae66005703789a3
Unhide the write mode constants.
Unhide the write method where data is stored in a ByteBuffer.
Bug 7919023
Change-Id: Ie9e24c744067f164d1a3e3363c7718b0a70e1cae
Priority is given first to the system priorty session, then to
active local sessions, then to active remote sessions, then to
the rest of the sessions. Ordering within categories is by whoever
last performed an action we associate with the user.
The stack has methods for getting filtered sets of this priority.
This also:
-Changes publish to setActive(boolean)
-Adds a flag for handling media buttons.
-Adds a flag for transport controls instead of enabling once.
-Unhides the setFlags API.
-Updates the legacy helper to use the flags.
Change-Id: I6ebeb27410de1b24149fd6e1785613ac444f0774
This adds a hidden call to set flags and a flag for making a session an
exclusive high priority session. This will cause all media button events
to be sent to that session as long as it is stillr egistered. This
requires the MODIFY_PHONE_STATE permission like the old forCalls API.
This also adds a way to get controllers for all the ongoing sessions.
This is protected by the MEDIA_CONTENT_CONTROL permission like the
old RemoteController APIs.
Change-Id: I51540e8dcf3a7dbe02a0f8ee003821e40af653a3
BOOT_COMPLETED intent is not a reliable way for system services
to detect boot completion. The intent broadcast can be significantly
delayed and there is no guaranty that system services
receive it before apps.
Use a systemReady() method called by SystemServer instead.
Bug: 14323903.
Change-Id: I781596a3545e7a1e719799982347cbcd9a4c9009
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
When updating the PlayerRecord stack on playstate changes and
media button event receiver registrations, evaluate the index
of the stack entry to remove against the index of the last playing
entry as this index was valid before the entry was removed.
This affects the insertion index.
Change-Id: Iec58d2df6bcbd8f55925e9e0f9d48f698f7cf4e5
If present and set to false, media http redirects across domains
will not be followed. As long as domains are identical, redirects
across protocols or ports will still be followed.
Also fail more seriously if redirection fails or is not supported,
so that media client does not keep retrying the connection.
Bug: 12573548
Change-Id: Ifd2539ad3a90f669d43bd0e82845dbc8ae0b4a3e