summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/com/android/internal/app/MediaRouteChooserDialog.java6
-rw-r--r--core/res/res/layout/media_route_chooser_dialog.xml3
2 files changed, 5 insertions, 4 deletions
diff --git a/core/java/com/android/internal/app/MediaRouteChooserDialog.java b/core/java/com/android/internal/app/MediaRouteChooserDialog.java
index b963c74..944cc83 100644
--- a/core/java/com/android/internal/app/MediaRouteChooserDialog.java
+++ b/core/java/com/android/internal/app/MediaRouteChooserDialog.java
@@ -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
diff --git a/core/res/res/layout/media_route_chooser_dialog.xml b/core/res/res/layout/media_route_chooser_dialog.xml
index 3eba9be..d1c6267 100644
--- a/core/res/res/layout/media_route_chooser_dialog.xml
+++ b/core/res/res/layout/media_route_chooser_dialog.xml
@@ -23,7 +23,8 @@
<!-- List of routes. -->
<ListView android:id="@+id/media_route_list"
android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"
+ android:layout_weight="1" />
<!-- Content to show when list is empty. -->
<LinearLayout android:id="@android:id/empty"