Lines Matching refs:route

78             final RouteInfo route = mRoutes.valueAt(i);
79 pw.print(" "); pw.println(routeToString(route));
148 for (RouteInfo route : mRoutes.values()) {
150 device.id = route.getTag().toString();
151 final CharSequence name = route.getName(mContext);
153 final CharSequence description = route.getDescription();
155 device.state = route.isConnecting() ? CastDevice.STATE_CONNECTING
156 : route.isSelected() ? CastDevice.STATE_CONNECTED
158 device.tag = route;
168 final RouteInfo route = (RouteInfo) device.tag;
169 if (DEBUG) Log.d(TAG, "startCasting: " + routeToString(route));
170 mMediaRouter.selectRoute(ROUTE_TYPE_REMOTE_DISPLAY, route);
230 final RouteInfo route = mMediaRouter.getRouteAt(i);
231 if (!route.isEnabled()) continue;
232 if (!route.matchesTypes(ROUTE_TYPE_REMOTE_DISPLAY)) continue;
233 ensureTagExists(route);
234 mRoutes.put(route.getTag().toString(), route);
245 private void ensureTagExists(RouteInfo route) {
246 if (route.getTag() == null) {
247 route.setTag(UUID.randomUUID().toString());
261 private static String routeToString(RouteInfo route) {
262 if (route == null) return null;
263 final StringBuilder sb = new StringBuilder().append(route.getName()).append('/')
264 .append(route.getDescription()).append('@').append(route.getDeviceAddress())
265 .append(",status=").append(route.getStatus());
266 if (route.isDefault()) sb.append(",default");
267 if (route.isEnabled()) sb.append(",enabled");
268 if (route.isConnecting()) sb.append(",connecting");
269 if (route.isSelected()) sb.append(",selected");
270 return sb.append(",id=").append(route.getTag()).toString();
275 public void onRouteAdded(MediaRouter router, RouteInfo route) {
276 if (DEBUG) Log.d(TAG, "onRouteAdded: " + routeToString(route));
280 public void onRouteChanged(MediaRouter router, RouteInfo route) {
281 if (DEBUG) Log.d(TAG, "onRouteChanged: " + routeToString(route));
285 public void onRouteRemoved(MediaRouter router, RouteInfo route) {
286 if (DEBUG) Log.d(TAG, "onRouteRemoved: " + routeToString(route));
290 public void onRouteSelected(MediaRouter router, int type, RouteInfo route) {
291 if (DEBUG) Log.d(TAG, "onRouteSelected(" + type + "): " + routeToString(route));
295 public void onRouteUnselected(MediaRouter router, int type, RouteInfo route) {
296 if (DEBUG) Log.d(TAG, "onRouteUnselected(" + type + "): " + routeToString(route));