UI tweaks.

Hide disabled routes from the chooser.

Fix layout of chooser dialog when the settings button is visible and
the list is very long to prevent truncation of the settings button.

Fix an issue when we fake the route connecting status when a route
is selected.  The route changed notification needs to be propagated
to apps.  Fake it better.

Immediately disconnect from a route when the connection is lost or
a connection attempt fails.  Added a few new test displays for this
case.

Bug: 11257292
Change-Id: I360ab5dc937ad60d97592eab54b19f034519645e
This commit is contained in:
Jeff Brown
2013-11-11 17:55:08 -08:00
parent 596e409ec9
commit 39ad0e5598
6 changed files with 244 additions and 69 deletions

View File

@ -106,8 +106,8 @@ public class MediaRouteChooserDialog extends Dialog {
/**
* Returns true if the route should be included in the list.
* <p>
* The default implementation returns true for non-default routes that
* match the selector. Subclasses can override this method to filter routes
* The default implementation returns true for enabled non-default routes that
* match the route types. Subclasses can override this method to filter routes
* differently.
* </p>
*
@ -115,7 +115,7 @@ public class MediaRouteChooserDialog extends Dialog {
* @return True if the route should be included in the chooser dialog.
*/
public boolean onFilterRoute(MediaRouter.RouteInfo route) {
return !route.isDefault() && route.matchesTypes(mRouteTypes);
return !route.isDefault() && route.isEnabled() && route.matchesTypes(mRouteTypes);
}
@Override