The route ID of a bluetooth route was its hardware address and
SettingsLib depended on that to get BluetoothDevice.
We can't use the address as ID for a pair of hearing devices,
which has their own address but should have the same route ID.
Instead, this CL adds "address" field explictly to be used for bluetooth
routes.
Maybe it can be used by other devices as well.
Bug: 157708273
Test: make -j42 RunSettingsLibRoboTests && cts test
Change-Id: Ib940da9975fc8d68ec3fb7cf2c4a85c0d1a195f3
The audio format doesn't always make sense in recognition events, for
example in a failure or abort event, so we allow it to be null.
However since the SoundTrigger.java API doesn't allow that, we inject
a default if it is not available.
Bug: 157496890
Test: Simulated a device that doesn't support concurrent capture,
reproduced the bug, applied the fix, verified.
Change-Id: I1e4adf9f3ccdc0f62cb9ca5e8c07df3c40a9d2cd
The method can be called with a random requestId, or called multiple
times with the valid requestId. It can result unnecessary calls
to MediaRouter2Manager#onRequestFailed().
This CL resolves this problem.
Bug: 157873556
Test: Passes CTS and mediaroutertest
Change-Id: Ia7dd4ddafd532b9f23bf19491a0820d5a74f6a70
Add the callback to let MediaRouter2Manager get notified
of released sessions.
A test is also added to check if the manager is aware of
a released session when the session is released from the
media router.
Bug: 157872573
Test: atest mediaroutertest
Change-Id: Ifb96b23ed61cc15f5015c453727a487c3b09a92b
Eliminate potential race condition for postEventFromNative.
Fixes: 157755647
Test: atest com.android.car where race condition was hit
Change-Id: I5d11f8769d2c09a6a630332db447302e06a5869b
When a transfer is ignored by the provider.
It is handled as a failure by MediaRouter2Manager.
A test is added for timeout, which takes 30 seconds.
Bug: 157875723
Test: atest mediaroutertest
Change-Id: I3f0ec77551309c96f8f589057800082f6121d4e2
Bug: 149526397
Test: Passed CTS and mediaroutertest
Also checked logs that DEFAULT_ROUTE is not added.
Change-Id: Icc0a5f2ea8f93fd7baba132a9bd4a1f9d798bba9
This CL ignores attempts to transfer to unknown route in
MediaRouter2Manager.
This CL also fixes wrong acquisition of locks when getXXXRoutes.
Bug: 157875504
Test: atest mediaroutertest
Change-Id: Ic3415844551c672b42d19d9744d7538a9d7df7c3
It actually needs the foregroud service to be the type "mediaProjection"
Bug: 157265923
Test: m -j ds-docs-java
Change-Id: Ia5aab928be1755e3117432bdec423e88f997c55b
This CL ignores requests that contain unknown session IDs and
make sure sequence of binder calls are aligned with notifySession
Created/Updated/Released.
Bug: 157873546
Bug: 157873487
Test: Run CTS and atest mediarouter test
Change-Id: Ie31e2fca8160093cf54886180e67d40865a35d6d
This CL adds bug nubmers for TODOs which are needed to resolve in
Android R timeframe.
Bug: 157875570
Test: Builds successfully
Change-Id: I8d5adcabb4ec42feabf38ac3cedcd63e9a5a9cf2
Based on feedback from a partner, it sounds like getFrameAtTime()
and getScaledFrameAtTime() may end up returning low-quality bitmaps.
To make it clear that we want to create high-quality thumbnails,
this change explicitly requests ARGB_8888.
Bug: 157448043
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I39c7c552e8fa715ec13efa75c1c3a30d58492bfb
copy file from sdcard to internal storage through MTP,
then the file can't be renamed
bug: 147715888
Change-Id: Iffeeeb1372e0ecf305cf0c70edb601a4b2001342