Media: Implement Seamless Transfer with a single provider.
Seamless transfer for a single provider case and two providers case should be dealt with in different ways. For a single provider case, the provider can handle transfer and returns the result of transfer. For multiple providers case, the media app handles the transfer. This CL covers seamless transfer within a single provider. If a user requests semless transfer in System UI, MR2Manager.selectRoute should be called and this request is sent to MediaRoute2ProviderService that can handle seamless transfer internally. The new test, testSingleProviderSelect() in MediaRouterManagerTest tests the path for seamless transfer and ensure transfer request is handled by a provider. From this CL, we use packagename instead of uid to select app for seamless transfer. This is required to handle unlaunched apps that don't have uid. It would prevent to use media router 2 in a multi-user case, that will be supported by another CL. I also added onUnselectRoute in MediaRoute2ProviderService, which is essential to notify a provider that a media app stopped casting. Bug: 136775407 Test: atest mediaroutertest Change-Id: Ie3d0e988a72eedea6036f465454e661c424a0495
Loading
Please register or sign in to comment