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

Clear routes when media router manager has no callback

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
parent 9c5a02c2
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