Only selected routes can be deselectable and not selected routes
can be selectable from this CL.
Bug: 154918270
Test: Manually and atest mediaroutertest
Change-Id: I2e66d814190b003c935b21a744d24fa2b5d2c7ac
This CL clears routes when the last callback of MediaRouter2Manager
is unregistered. By doing this, we can ensure
MediaRouter2Manager#getAvailableRoutes() returns correct routes
during at least a single callback is registered.
A test for the behavior is added as well.
This CL also fixed a bug that unregistering a callback from MediaRouter2
disconnects it when multiple callback is used.
Bug: 153515567
Test: atest mediaroutertest & cts test & manually
using MediaRouter2Demo and Sample OutputSwitcher to see
if forgotten BT device is correctly removed.
(w/o this CL forgotten BT device remains)
Change-Id: I31a5001115f1f163c8971bbd906516551b860252
When MR2Manager requests to create a routing session, it should pass
session hints to the target provider.
This CL adds a logic that MR2Manager asks media router instance to
get session hints to be passed to the provider.
Bug: 152851868
Test: atest mediaroutertest
Change-Id: Ib421f61f663090c6ed95c8b1a2f7deeb80e5be16
Call MediaRouter2Manager#onTransferred to notify
whether transfer is succeeded or failed.
Bug: 151396145
Test: atest mediaroutertest
Change-Id: I4331c80d03c61b5a722a8be404c979d3fcfa23f1
Use case: Jetpack WM will use them to get the location of windows on
screen and compute the display feature positions in window coordinate
space.
Bug: 150908045
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest CtsWindowManagerDeviceTestCases:WindowMetricsTests
Change-Id: Ia08950cd5df35971408e8b17bb27d97d29d0ab9b
Exempt-From-Owner-Approval: API change
Adding a multi-thread client helps to unveil problems
with concurrent use of VisualizerEffect.
Bug: 149375271
Test: enable "Multithreaded Use" in Visualizer Test
Change-Id: Id485790dc7e91fde5dc5844a287645e96f8ec253
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing
For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish
Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing
For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish
Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
The hidden API is used by SystemUI process to adjust the system UI based
on when a certain camera is opened or closed.
Test: Manually observe callbacks in SystemUI when running camera CTS
Bug: 150540299
Change-Id: I04cae782d96f0e32be8ef588dcd328f84b32887a
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
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
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
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
Change deviceType to type and define more types.
TYPE_GROUP is also added to classify static group routes.
Device type for the default route is set from now
Bug: 149677159
Test: cts test and atest mediaroutertest
Change-Id: I0626efe7b6160f22fe69a0b75368ee1a67d8768c
Two set of preferred features could be the same in a different order.
Test: atest mediaroutertest
Bug: 149887171
Change-Id: I10f6878ad42cf49f2337d2d69f884038b144df45
There was a bug that waitAndGetRoutesWithManager returnes
a wrong list of routes that doesn't match the given features.
Test: atest mediaroutertest
Change-Id: Ibd01ba9d20fd5fa922d268998e10b497a88a3b45
Rename APIS related to RoutingController.
Specifically,
- requestCreateController is changed to transferTo, which is the only
way to "transfer" that may or may not create a controller.
- ControllerCallback is split into TransferCallback and
(new) ControllerCallback.
- onControllerCreated and onControllerReleased is merged into
onTransferred(old, new)
Rename APIS related to RoutingController.
Bug: 149185558
Test: atest android.media.cts.MediaRoute2InfoTest
&& atest android.media.cts.MediaRouter2Test
&& atest android.media.cts.RouteDiscoveryPreferenceTest
&& atest android.media.cts.RoutingSessionInfoTest
&& atest android.media.cts.MediaRoute2ProviderServiceTest
&& atest mediaroutertest
Change-Id: I348581be7c0b8537da22da3bc81e2ca31e16203f
Unused sendControlRequest is removed.
According to that, MediaRouter2ManagerTest is a little bit
modified.
Bug: 145487522
Test: atest cts realted to media router 2
Change-Id: I3c2c5d1c2c67a3398a45bb2fab4e90dcf90f627e
It was s/[tT]ransferrable/$1ransferable/g though.
Bug: 149534504
Test: build & atest mr2 related tests
Change-Id: I7b6cbb51993a5f1673e39f590d65e057d9474315