Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11793,6 +11793,7 @@ package android.media { method public android.media.MediaRouter.UserRouteInfo createUserRoute(android.media.MediaRouter.RouteCategory); method public android.media.MediaRouter.RouteCategory getCategoryAt(int); method public int getCategoryCount(); method public android.media.MediaRouter.RouteInfo getDefaultRoute(); method public android.media.MediaRouter.RouteInfo getRouteAt(int); method public int getRouteCount(); method public android.media.MediaRouter.RouteInfo getSelectedRoute(int); core/java/android/app/MediaRouteButton.java +3 −3 Original line number Diff line number Diff line Loading @@ -123,13 +123,13 @@ public class MediaRouteButton extends View { if (mToggleMode) { if (mRemoteActive) { mRouter.selectRouteInt(mRouteTypes, mRouter.getSystemAudioRoute()); mRouter.selectRouteInt(mRouteTypes, mRouter.getDefaultRoute()); } else { final int N = mRouter.getRouteCount(); for (int i = 0; i < N; i++) { final RouteInfo route = mRouter.getRouteAt(i); if ((route.getSupportedTypes() & mRouteTypes) != 0 && route != mRouter.getSystemAudioRoute()) { route != mRouter.getDefaultRoute()) { mRouter.selectRouteInt(mRouteTypes, route); } } Loading Loading @@ -216,7 +216,7 @@ public class MediaRouteButton extends View { void updateRemoteIndicator() { final RouteInfo selected = mRouter.getSelectedRoute(mRouteTypes); final boolean isRemote = selected != mRouter.getSystemAudioRoute(); final boolean isRemote = selected != mRouter.getDefaultRoute(); final boolean isConnecting = selected != null && selected.getStatusCode() == RouteInfo.STATUS_CONNECTING; Loading media/java/android/media/MediaRouter.java +14 −6 Original line number Diff line number Diff line Loading @@ -299,16 +299,21 @@ public class MediaRouter { } /** * @hide for use by framework routing UI * Gets the default route for playing media content on the system. * <p> * The system always provides a default route. * </p> * * @return The default route, which is guaranteed to never be null. */ public RouteInfo getSystemAudioRoute() { public RouteInfo getDefaultRoute() { return sStatic.mDefaultAudioVideo; } /** * @hide for use by framework routing UI */ public RouteCategory getSystemAudioCategory() { public RouteCategory getSystemCategory() { return sStatic.mSystemCategory; } Loading Loading @@ -372,14 +377,17 @@ public class MediaRouter { /** * Select the specified route to use for output of the given media types. * <p class="note"> * As API version 18, this function may be used to select any route. * In prior versions, this function could only be used to select user * routes and would ignore any attempt to select a system route. * </p> * * @param types type flags indicating which types this route should be used for. * The route must support at least a subset. * @param route Route to select */ public void selectRoute(int types, RouteInfo route) { // Applications shouldn't programmatically change anything but user routes. types &= ROUTE_TYPE_USER; selectRouteStatic(types, route); } Loading Loading @@ -454,7 +462,7 @@ public class MediaRouter { * App-specified route definitions are created using {@link #createUserRoute(RouteCategory)} * * @param info Definition of the route to add * @see #createUserRoute() * @see #createUserRoute(RouteCategory) * @see #removeUserRoute(UserRouteInfo) */ public void addUserRoute(UserRouteInfo info) { Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11793,6 +11793,7 @@ package android.media { method public android.media.MediaRouter.UserRouteInfo createUserRoute(android.media.MediaRouter.RouteCategory); method public android.media.MediaRouter.RouteCategory getCategoryAt(int); method public int getCategoryCount(); method public android.media.MediaRouter.RouteInfo getDefaultRoute(); method public android.media.MediaRouter.RouteInfo getRouteAt(int); method public int getRouteCount(); method public android.media.MediaRouter.RouteInfo getSelectedRoute(int);
core/java/android/app/MediaRouteButton.java +3 −3 Original line number Diff line number Diff line Loading @@ -123,13 +123,13 @@ public class MediaRouteButton extends View { if (mToggleMode) { if (mRemoteActive) { mRouter.selectRouteInt(mRouteTypes, mRouter.getSystemAudioRoute()); mRouter.selectRouteInt(mRouteTypes, mRouter.getDefaultRoute()); } else { final int N = mRouter.getRouteCount(); for (int i = 0; i < N; i++) { final RouteInfo route = mRouter.getRouteAt(i); if ((route.getSupportedTypes() & mRouteTypes) != 0 && route != mRouter.getSystemAudioRoute()) { route != mRouter.getDefaultRoute()) { mRouter.selectRouteInt(mRouteTypes, route); } } Loading Loading @@ -216,7 +216,7 @@ public class MediaRouteButton extends View { void updateRemoteIndicator() { final RouteInfo selected = mRouter.getSelectedRoute(mRouteTypes); final boolean isRemote = selected != mRouter.getSystemAudioRoute(); final boolean isRemote = selected != mRouter.getDefaultRoute(); final boolean isConnecting = selected != null && selected.getStatusCode() == RouteInfo.STATUS_CONNECTING; Loading
media/java/android/media/MediaRouter.java +14 −6 Original line number Diff line number Diff line Loading @@ -299,16 +299,21 @@ public class MediaRouter { } /** * @hide for use by framework routing UI * Gets the default route for playing media content on the system. * <p> * The system always provides a default route. * </p> * * @return The default route, which is guaranteed to never be null. */ public RouteInfo getSystemAudioRoute() { public RouteInfo getDefaultRoute() { return sStatic.mDefaultAudioVideo; } /** * @hide for use by framework routing UI */ public RouteCategory getSystemAudioCategory() { public RouteCategory getSystemCategory() { return sStatic.mSystemCategory; } Loading Loading @@ -372,14 +377,17 @@ public class MediaRouter { /** * Select the specified route to use for output of the given media types. * <p class="note"> * As API version 18, this function may be used to select any route. * In prior versions, this function could only be used to select user * routes and would ignore any attempt to select a system route. * </p> * * @param types type flags indicating which types this route should be used for. * The route must support at least a subset. * @param route Route to select */ public void selectRoute(int types, RouteInfo route) { // Applications shouldn't programmatically change anything but user routes. types &= ROUTE_TYPE_USER; selectRouteStatic(types, route); } Loading Loading @@ -454,7 +462,7 @@ public class MediaRouter { * App-specified route definitions are created using {@link #createUserRoute(RouteCategory)} * * @param info Definition of the route to add * @see #createUserRoute() * @see #createUserRoute(RouteCategory) * @see #removeUserRoute(UserRouteInfo) */ public void addUserRoute(UserRouteInfo info) { Loading