For consistency, this CL applies the same changes also to the
internal methods.
Bug: 150922531
Test: CTS and mediaroutertest (Passed except already failing methods)
Change-Id: Iac0ab78464b16212cb3ad46519f5892e8d1b69d9
Add a disclamer and cleanups some comments.
Add a link to AndroidX media router.
Bug: 150291987
Test: N/A
Change-Id: I6ba5505b52a256ac4ee30b087524f2a4263e8df7
In the previous CL, we relied on MediaRouterUtils.getOriginalId()
that returns a wrong ID when it has no provider ID but the separator.
Resolve the issue by resetting route ID in Builder class.
Bug: 150666870
Bug: 150751854
Test: cts test realted to MediaRouter2
Change-Id: Ib17cdc8385308ccadad79e117fcfede72b8af6b5
When initializing a AudioTrack, there will be a IAudioTrackCallback
created systematically in JNI. It will be registered as a callback after
native AudioTrack created. Currently, it is used for notifying codec
format changed.
Bug: 150301890
Test: manual
Test: atest AudioMetadataTest
Change-Id: Ib35749ebbbef2b11b90750663d110430f0ce8390
This CL fixes the issue that RoutingSessionInfo#getSelectedRoutes
return improper route IDs when it is recreated.
To ensure provider ID related feature, another test is added.
Since RoutingSessionInfo#setProviderId is a hidden method, the test
is not added to CTS.
The reason for moving "updating route ID logic" into Builder is from
considering use cases.
The original ID of the route is only checked when the provider ID is
set and a route is added to or removed from a RoutingSessionInfo,
which is very rare case.
This CL also fixes the issue that didn't release the previous routing
session when transfer.
Bug: 150666870
Bug: 150751854
Test: atest mediaroutertest
Change-Id: Ic05c11ebf43562b44214eb661c8b9c106f1c9d3e
1. Add config values for setting custom dispatcher and provider
class names as @hide APIs.
2. Make MediaSessionService use the custom dispatcher and
provider classes (if they exist) via reflection.
3. Make SessionPolicyProvider/MediaKeyDispatcher abstract classes
and add a default constructor without parameters to make sure it
can be called via reflection.
TODO: Add API for getting/setting policies via MediaSessionManager
once b/149006225 is fixed.
Bug: 147027868
Test: build and manually test
Change-Id: I6f809ce2201cb8fc25d603654148f211a78ea107
As a following CL, RoutingController will be removed.
Instead, MediaRouter2Manager will use RoutingSesionInfo.
This CL adds necessary methods for that.
Added Callback#onTransferred and #onTransferFailed.
Bug: 150571233
Test: atest mediaroutertest
Change-Id: If2c23c483f80b6c93a14d1f1f93dfc40463ede1a
attemptDataSource expects setting data source to fail in some cases, so
we shouldn't log as it can be spammy.
Fixes: 148125536
Test: build (safe change to remove logging)
Change-Id: I92663e42b593d1ead45da9541810cd0d3843a495
Added ability to set duration of last sample by writing an empty buffer
with EOS flag marked along with presentation time stamp at the end.
Have updated the same and the default behavior in JavaDoc of MediaMuxer.
Bug: 141573686
Bug: 121052341
Test: Document is updated with new information properly.
Change-Id: If15d555e877f0d17040688858673946cf4fe86af
(cherry picked from commit 19261fac01)
This both avoids the need to make extra copied for the models and
allows exceeding the parcel size limits.
Bug: 150100907
Test: Manual testing of basic sound trigger functionality
Change-Id: Ic4c5c1a9de3e29b1b6fa82442254e1afe7daec19
This also fixes the Activity#setMediaController() which previously
ignored because the MediaSessionService failed to find session set to
the foreground activity.
Bug: 149006225
Test: Run MediaActivityTest in CtsMediaTestCases
Change-Id: I8a22665a109ce480ae9604f5c7262bf2b3c2db8c
Previous implementation relied on client to pass a token which the
service used to verify if it was the active service. This is seen to be
a security concern as there is no way to verify how the client obtained
the token. Instead, a check is done to confirm the caller's UID matches
the UID of the active service.
In the case of voice model enrollment, KeyphraseEnrollmentInfo class is
leveraged. A client is allowed to enroll if it is the active voice
interaction service or if it is a voice model enrollment application
bundled with the system image.
All previous manifest permision checks still apply.
Bug: 148159858
Test: gts-tradefed run gts-dev -m GtsAssistIntentTestCases -t \
com.google.android.assist.gts.KeyphraseModelManagerTest \
\#testShouldEnrollOnlyWhenActiveService
Merged-In: Ie2c4653d365770a9123a22bc69822518b4ccc568
Change-Id: Ie2c4653d365770a9123a22bc69822518b4ccc568
(cherry picked from commit c6f4118f9e)