Bind provider services when necessary
The media router service bound media route provider
services only when there was a discovery request.
This prevented output switcher to work when there are only
legacy media router clients (i.e. apps that didn't enable MR2)
This CL makes the media router service binds media route provider
services when the MediaRouter2Manager#startScan is called
so that the output switcher can show cast sessions created by
the providers.
This CL also changes communication between the media router service and
the provider services as cast sessions can be created/released even when the
media router service is disconnected from media route provider.
Bug: 176774510
Test: manually
Change-Id: I481e1aa8f9dcc136cbf5788b9f66540708665af2
5 files changed