Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a0d47419 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun
Browse files

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
parent 293bb896
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment