Lines Matching refs:route

111             // This will select the active wifi display route if there is one.
127 // This will select the active BT route if there is one and the current
128 // selected route is the default system route, or if there is no selected
129 // route yet.
133 // Select the default route if the above didn't sync us up
266 * <p>Unlike other media route types, user routes are managed by the application.
316 * Return the currently selected route for the given types
318 * @param type route types
319 * @return the selected route
328 * additional route types specified.
362 * Select the specified route to use for output of the given media types.
364 * @param types type flags indicating which types this route should be used for.
365 * The route must support at least a subset.
366 * @param route Route to select
368 public void selectRoute(int types, RouteInfo route) {
371 selectRouteStatic(types, route);
377 public void selectRouteInt(int types, RouteInfo route) {
378 selectRouteStatic(types, route);
381 static void selectRouteStatic(int types, RouteInfo route) {
383 if (oldRoute == route) return;
384 if ((route.getSupportedTypes() & types) == 0) {
385 Log.w(TAG, "selectRoute ignored; cannot select route with supported types " +
386 typesToString(route.getSupportedTypes()) + " into route types " +
393 (route == btRoute || route == sStatic.mDefaultAudioVideo)) {
395 sStatic.mAudioService.setBluetoothA2dpOn(route == btRoute);
404 final boolean newRouteHasAddress = route != null && route.mDeviceAddress != null;
406 if (newRouteHasAddress && !matchesDeviceAddress(activeDisplay, route)) {
407 sStatic.mDisplayService.connectWifiDisplay(route.mDeviceAddress);
417 sStatic.mSelectedRoute = route;
418 if (route != null) {
420 dispatchRouteSelected(types & route.getSupportedTypes(), route);
425 * Compare the device address of a display and a route.
441 * Add an app-specified route for media to the MediaRouter.
442 * App-specified route definitions are created using {@link #createUserRoute(RouteCategory)}
444 * @param info Definition of the route to add
465 // Enforce that any added route in a groupable category must be in a group.
480 * Remove an app-specified route for media from the MediaRouter.
482 * @param info Definition of the route to remove
526 // Removing the currently selected route? Select the default before we remove it.
527 // TODO: Be smarter about the route types here; this selects for all valid.
551 // Removing the currently selected route? Select the default before we remove it.
552 // TODO: Be smarter about the route types here; this selects for all valid.
595 * Return the route at the specified index.
597 * @param index index of the route to return
598 * @return the route at index
613 * Create a new user route that may be modified and registered for use by the application.
615 * @param category The category the new route will belong to
627 * Create a new route category. Each route must belong to a category.
638 * Create a new route category. Each route must belong to a category.
764 final RouteInfo route = findWifiDisplayRoute(d);
765 updateWifiDisplayRoute(route, d, available, newStatus);
811 private static void updateWifiDisplayRoute(RouteInfo route, WifiDisplay display,
841 if (!route.getName().equals(newName)) {
842 route.mName = newName;
846 changed |= route.mEnabled != available;
847 route.mEnabled = available;
849 changed |= route.setStatusCode(newStatus);
852 dispatchRouteChanged(route);
855 if (!available && route == sStatic.mSelectedRoute) {
883 private static Display choosePresentationDisplayForRoute(RouteInfo route, Display[] displays) {
884 if ((route.mSupportedTypes & ROUTE_TYPE_LIVE_VIDEO) != 0) {
885 if (route.mDeviceAddress != null) {
889 && route.mDeviceAddress.equals(display.getAddress())) {
896 if (route == sStatic.mDefaultAudioVideo && displays.length > 0) {
905 * Information about a media route.
969 * @return The user-friendly name of a media route. This is the string presented
970 * to users who may select this as the active route.
977 * Return the properly localized/resource selected name of this route.
980 * @return The user-friendly name of the media route. This is the string presented
981 * to users who may select this as the active route.
995 * @return The user-friendly status for a media route. This may include a description
1003 * Set this route's status by predetermined status code. If the caller
1004 * should dispatch a route changed event this call will return true;
1038 * @return A media type flag set describing which types this route supports.
1045 * @return The group that this route belongs to.
1052 * @return the category this route belongs to.
1059 * Get the icon representing this route.
1062 * @return the icon representing this route or null if no icon is available
1069 * Set an application-specific tag object for this route.
1071 * route for internal tracking.
1073 * <p>Note that the lifespan of a route may be well past the lifespan of
1077 * @param tag Arbitrary, app-specific data for this route to hold for later use
1093 * @return the type of playback associated with this route
1101 * @return the stream over which the playback associated with this route is performed
1109 * Return the current volume for this route. Depending on the route, this may only
1110 * be valid if the route is currently selected.
1112 * @return the volume at which the playback associated with this route is performed
1130 * Request a volume change for this route.
1142 "Non-local volume playback on system route? " +
1148 * Request an incremental volume update for this route.
1162 "Non-local volume playback on system route? " +
1168 * @return the maximum volume at which the playback associated with this route is performed
1186 * @return how volume is handling on the route
1195 * a {@link android.app.Presentation} on an external display when this route is selected.
1196 * Depending on the route, this may only be valid if the route is currently
1199 * The preferred presentation display may change independently of the route
1201 * of the default system route may change when an external HDMI display is connected
1202 * or disconnected even though the route itself has not changed.
1205 * the route or if the display is not ready to show UI yet.
1215 * @return The preferred presentation display to use when this route is
1226 * @return true if this route is enabled and may be selected
1249 mVcb.vcb.onVolumeUpdateRequest(mVcb.route, direction);
1251 mVcb.vcb.onVolumeSetRequest(mVcb.route, value);
1275 * Information about a route that the application may define and modify.
1276 * A user route defaults to {@link RouteInfo#PLAYBACK_TYPE_REMOTE} and
1292 * Set the user-visible name of this route.
1293 * @param name Name to display to the user to describe this route
1301 * Set the user-visible name of this route.
1302 * @param resId Resource ID of the name to display to the user to describe this route
1311 * Set the current user-visible status for this route.
1313 * of this route is currently doing
1321 * user route.
1323 * <p>If this route manages remote playback, the data exposed by this
1325 * such as route volume info in related UIs.</p>
1330 * @param rcc RemoteControlClient associated with this route
1338 * Retrieve the RemoteControlClient associated with this route, if one has been set.
1340 * @return the RemoteControlClient associated with this route
1348 * Set an icon that will be used to represent this route.
1351 * @param icon icon drawable to use to represent this route
1358 * Set an icon that will be used to represent this route.
1361 * @param resId Resource ID of an icon drawable to use to represent this route
1376 * Defines whether playback associated with this route is "local"
1389 * Defines whether volume for the playback associated with this route is fixed
1403 * Defines at what volume the playback associated with this route is performed (for user
1423 Log.e(TAG, "Cannot requestSetVolume on user route - no volume callback set");
1434 Log.e(TAG, "Cannot requestChangeVolume on user route - no volumec callback set");
1442 * Defines the maximum volume at which the playback associated with this route is performed
1495 * Information about a route that consists of multiple other routes in a group.
1513 * Add a route to this group. The route must not currently belong to another group.
1515 * @param route route to add to this group
1517 public void addRoute(RouteInfo route) {
1518 if (route.getGroup() != null) {
1519 throw new IllegalStateException("Route " + route + " is already part of a group.");
1521 if (route.getCategory() != mCategory) {
1524 "(Route category=" + route.getCategory() +
1528 mRoutes.add(route);
1529 route.mGroup = this;
1533 dispatchRouteGrouped(route, this, at);
1537 * Add a route to this group before the specified index.
1539 * @param route route to add
1540 * @param insertAt insert the new route before this index
1542 public void addRoute(RouteInfo route, int insertAt) {
1543 if (route.getGroup() != null) {
1544 throw new IllegalStateException("Route " + route + " is already part of a group.");
1546 if (route.getCategory() != mCategory) {
1549 "(Route category=" + route.getCategory() +
1552 mRoutes.add(insertAt, route);
1553 route.mGroup = this;
1557 dispatchRouteGrouped(route, this, insertAt);
1561 * Remove a route from this group.
1563 * @param route route to remove
1565 public void removeRoute(RouteInfo route) {
1566 if (route.getGroup() != this) {
1567 throw new IllegalArgumentException("Route " + route +
1570 mRoutes.remove(route);
1571 route.mGroup = null;
1574 dispatchRouteUngrouped(route, this);
1579 * Remove the route at the specified index from this group.
1581 * @param index index of the route to remove
1584 RouteInfo route = mRoutes.remove(index);
1585 route.mGroup = null;
1588 dispatchRouteUngrouped(route, this);
1600 * Return the route in this group at the specified index
1603 * @return The route at index
1639 final RouteInfo route = getRouteAt(i);
1640 final int routeVol = (int) (scaledVolume * route.getVolumeMax());
1641 route.requestSetVolume(routeVol);
1659 final RouteInfo route = getRouteAt(i);
1660 route.requestUpdateVolume(direction);
1661 final int routeVol = route.getVolume();
1715 final RouteInfo route = mRoutes.get(i);
1716 types |= route.mSupportedTypes;
1717 final int routeMaxVolume = route.getVolumeMax();
1721 isLocal &= route.getPlaybackType() == PLAYBACK_TYPE_LOCAL;
1722 isFixedVolume &= route.getVolumeHandling() == PLAYBACK_VOLUME_FIXED;
1782 * @return the name of this route category
1792 * @return the name of this route category
1810 * A RouteGroup is treated as a single route within its category.</p>
1827 final RouteInfo route = getRouteAtStatic(i);
1828 if (route.mCategory == this) {
1829 out.add(route);
1836 * @return Flag set describing the route types supported by this category
1892 * Called when the supplied route becomes selected as the active route
1893 * for the given route type.
1897 * @param info Route that has been selected for the given route types
1902 * Called when the supplied route becomes unselected as the active route
1903 * for the given route type.
1907 * @param info Route that has been unselected for the given route types
1912 * Called when a route for the specified type was added.
1920 * Called when a route for the specified type was removed.
1928 * Called when an aspect of the indicated route has changed.
1930 * <p>This will not indicate that the types supported by this route have
1934 * @param info The route that was changed
1939 * Called when a route is added to a group.
1942 * @param info The route that was added
1943 * @param group The group the route was added to
1944 * @param index The route index within group that info was added at
1950 * Called when a route is removed from a group.
1953 * @param info The route that was removed
1954 * @param group The group the route was removed from
1959 * Called when a route's volume changes.
1962 * @param info The route with altered volume
1967 * Called when a route's presentation display changes.
1969 * This method is called whenever the route's presentation display becomes
1974 * @param info The route whose presentation display changed
2025 public final RouteInfo route;
2027 public VolumeCallbackInfo(VolumeCallback vcb, RouteInfo route) {
2029 this.route = route;
2044 * Called when the volume for the route should be increased or decreased.
2045 * @param info the route affected by this event
2053 * Called when the volume for the route should be set to the given value
2054 * @param info the route affected by this event