As with this CL, media apps can get the list of available routes using MediaRouter2.getRoutes() or MediaRouter2.Callback.onRouteListChanged(). For that MediaRouterService notifies MediaRouter2 of providerinfos. This CL also clarifies provider info notification logic. 1) When a new client or a new manager is registered, it will be notified. 2) When a provider info is updated, it will be notified. onRouteListChanged will be called for a newly registerd callback. Fixed a bug that MediaRoute2ProviderProxy didn't report state update when the provider is disonnected. Test: atest mediaroutertest Change-Id: I50f5c3cabce80e7fb0a1b5596883c35911d6f122
MediaFrameworkTest/
Uses instrumentation and so can be run with runtest.
It assumes /sdcard/media_api/ has been populated.
contents/media_api/
Push to /sdcard/media_api/ for use with MediaFrameworkTest:
adb shell mkdir /sdcard/media_api
adb push contents/media_api/ /sdcard/media_api/
All other subdirectories are manual tests or sample apps.