This CL introduces "session" into MediaRouterProviderService.
When a client wants to use a route of a provider, it should
request the provider to create a new session and then,
the client will control the session instead of a route.
Clients can add/remove routes into/from the session
(a.k.a. dynamic grouping) and transfer media to the other
route in a provider with less delay.
RouteSessionInfo holds information about a session and
MediaRoute2ProviderService must set session info and implement
abstract methods.
Bug: 142762829
Test: atest mediaroutertest
Change-Id: Iaf668d9a2c360cd9c7dbc5f1766d14e0d81bb3e3
Audio offload support was added to AudioTrack in Q,
but only a few encoding were exposed (MP3 & AAC).
This patch adds only Opus support.
For R we probably want to expose all format that the framework supports.
Bug: 146540917
Test: AudioTrackOffloadTest AudioFormatTest
Change-Id: I2ca57d45081668f76f8d9e153f66d1fd41209685
Signed-off-by: Kevin Rocard <krocard@google.com>
This method will list up routes that are actively used
by some applications.
Once dynamic grouping is implemented, it will return
sessions instead of routes.
Bug: 146604082
Test: atest mediaroutertest
Change-Id: Ic013d3c2ded47b7ebca0b4cf99d2a7ea75045dc1
New stream type: AUDIO_STREAM_ASSISTANT
This is intended to be used by a virtual assistant like
Google Assistant, Bixby, etc.
The audio stream has own volume alias and the volume
does not change by volume changes of other streams.
Bug: 123745215
Test: make
Change-Id: Iad07d9f0b25ea35c6d565be677af7815bf2f6bd7
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I4bc8c9482e4bb1af21363f951affff7ee3fefeab
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
Change-Id: I087bb1cecbe59f1cf0c2e770c735d7a433722c6f
Once connection is made, route session info will be sent from provider
to clients. So the clients can group routes based on the route sesison
info
Bug: 142762829
Test: atest RouteSessionTest
Change-Id: Ia85a51df1f12362f05477f536f35cc6b398f9c49
This CL introduces a draft class MediaRouter2A which will eventually
replace MediaRouter2.
Here are the reasons for introducing this class,
rather than directly editing MediaRouter2:
- Introducing session/controller concept changes the role of
MediaRouter2 a lot (e.g. no select/deselect, different callbacks),
which makes rewriting much better than modifying current
implementation.
- Not to break current tests related to MediaRouterManager/Provider
- Easier readability (no mixed code with previous implementation)
Bug: 146471105
Test: atest mediaroutertest:MediaRouter2ATest
Change-Id: I9dfe34fdb9d4530275b65d2805b6bdd0abcb662d
RouteSessionController controls the session in media route providers.
Adding, removing, transferring routes can be done by using this class.
Bug: 146400872
Test: Builds successfully
Change-Id: I42cd862463b205b77f2e508ee3a49cc81b4c6ddd
An upcoming change will move MediaStore to be within the recently
created MediaProvider APEX. This means that MediaStore will need to
be fully built against @SystemApi, and so this CL adjusts APIs to
support a clean transition:
-- Listing of "recent" storage volumes and scan paths for "internal"
storage is now handled by StorageManager directly, so that partners
retain control over what is deemed recent.
-- StorageVolume now returns the MediaStore volume name and the
filesystem directory where its contents are presented to apps.
-- Conversion of legacy thumbnail "kind" values to dimensions now
happens directly inside MediaStore.
-- PendingParams and PendingSession are completely removed.
-- Contributed media APIs are completely removed.
-- Media for demo users is now surfaced as a unique StorageVolume.
-- Migrate most MediaStore APIs to accept ContentResolver, which
supports easy usage of ContentResolver.wrap().
Bug: 144247087, 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: in-place refactoring
Change-Id: I445528b2779bb37b9f2558e67a3cfc9f60412092
* changes:
Migrate SoundTrigger implementation to new service
Implement the soundtrigger_middlewware service
Add a permission for preempting sound trigger sessions
Sound trigger middleware service definition
Add audio.common types AIDL definition
This CL splits the MediaSessionManager.Callback (abstract class) with
OnMediaKeyEventDispatchedListener and
OnMediaKeyEventSessionChangedListener (interfaces with default methods).
It's to follow the API guideline and also to help the Bluetooth for
minally registering callbacks. (The Bluetooth currently only overrides
onAddressedPlayerChanged)
Bug: 138648566
Test: Build and run
Change-Id: I8607662b00db7fb32cf3f4ee527c52b9fd8a6d7c
(cherry picked from commit f5ff735fae)
* changes:
MediaSessionManager: Split abstract class Callback into interfaces
MediaSessionManager: Use Executor instead of Handler
Allow to register multiple callbacks in MediaSessionManager
This service is intended to replace:
frameworks/av/include/soundtrigger/ISoundTriggerHwService.h
This change only adds the replacement service, follow up
changes migrate the clients to use the new service and remove
the old one. The new service is feature-equivalent to the new
one, but offers the following advantages:
- AIDL interface (as opposed to hand-written parceling code).
- Pure Java implementation all the way to the HAL.
- Better documentation.
- Rigorous error handling.
- Unit tests.
- Reduced code complexity (less layers, better separation of
concerns).
- Permission-based security model (as opposed to some baked-in
assumptions about process affinity).
Change-Id: I79f4eff105d3e6245990be068b933d4d48c35a0d
Bug: 142070343