• Home
  • Raw
  • Download

Lines Matching refs:route

331                 final RouteInfo route = mRoutes.get(i);  in updatePresentationDisplays()  local
332 if (route.updatePresentationDisplay() || (route.mPresentationDisplay != null in updatePresentationDisplays()
333 && route.mPresentationDisplay.getDisplayId() == changedDisplayId)) { in updatePresentationDisplays()
334 dispatchRoutePresentationDisplayChanged(route); in updatePresentationDisplays()
415 RouteInfo route = findGlobalRoute(globalRoute.id); in updateClientState() local
416 if (route == null) { in updateClientState()
417 route = makeGlobalRoute(globalRoute); in updateClientState()
418 addRouteStatic(route); in updateClientState()
420 updateGlobalRoute(route, globalRoute); in updateClientState()
426 final RouteInfo route = findGlobalRoute(globallySelectedRouteId); in updateClientState() local
427 if (route == null) { in updateClientState()
430 } else if (route != mSelectedRoute) { in updateClientState()
432 Log.d(TAG, "Selecting new globally selected route: " + route); in updateClientState()
434 selectRouteStatic(route.mSupportedTypes, route, false); in updateClientState()
445 final RouteInfo route = mRoutes.get(i); in updateClientState() local
446 final String globalRouteId = route.mGlobalRouteId; in updateClientState()
455 removeRouteStatic(route); in updateClientState()
460 void requestSetVolume(RouteInfo route, int volume) { in requestSetVolume() argument
461 if (route.mGlobalRouteId != null && mClient != null) { in requestSetVolume()
464 route.mGlobalRouteId, volume); in requestSetVolume()
471 void requestUpdateVolume(RouteInfo route, int direction) { in requestUpdateVolume() argument
472 if (route.mGlobalRouteId != null && mClient != null) { in requestUpdateVolume()
475 route.mGlobalRouteId, direction); in requestUpdateVolume()
483 RouteInfo route = new RouteInfo(sStatic.mSystemCategory); in makeGlobalRoute() local
484 route.mGlobalRouteId = globalRoute.id; in makeGlobalRoute()
485 route.mName = globalRoute.name; in makeGlobalRoute()
486 route.mDescription = globalRoute.description; in makeGlobalRoute()
487 route.mSupportedTypes = globalRoute.supportedTypes; in makeGlobalRoute()
488 route.mDeviceType = globalRoute.deviceType; in makeGlobalRoute()
489 route.mEnabled = globalRoute.enabled; in makeGlobalRoute()
490 route.setRealStatusCode(globalRoute.statusCode); in makeGlobalRoute()
491 route.mPlaybackType = globalRoute.playbackType; in makeGlobalRoute()
492 route.mPlaybackStream = globalRoute.playbackStream; in makeGlobalRoute()
493 route.mVolume = globalRoute.volume; in makeGlobalRoute()
494 route.mVolumeMax = globalRoute.volumeMax; in makeGlobalRoute()
495 route.mVolumeHandling = globalRoute.volumeHandling; in makeGlobalRoute()
496 route.mPresentationDisplayId = globalRoute.presentationDisplayId; in makeGlobalRoute()
497 route.updatePresentationDisplay(); in makeGlobalRoute()
498 return route; in makeGlobalRoute()
501 void updateGlobalRoute(RouteInfo route, MediaRouterClientState.RouteInfo globalRoute) { in updateGlobalRoute() argument
506 if (!Objects.equals(route.mName, globalRoute.name)) { in updateGlobalRoute()
507 route.mName = globalRoute.name; in updateGlobalRoute()
510 if (!Objects.equals(route.mDescription, globalRoute.description)) { in updateGlobalRoute()
511 route.mDescription = globalRoute.description; in updateGlobalRoute()
514 final int oldSupportedTypes = route.mSupportedTypes; in updateGlobalRoute()
516 route.mSupportedTypes = globalRoute.supportedTypes; in updateGlobalRoute()
519 if (route.mEnabled != globalRoute.enabled) { in updateGlobalRoute()
520 route.mEnabled = globalRoute.enabled; in updateGlobalRoute()
523 if (route.mRealStatusCode != globalRoute.statusCode) { in updateGlobalRoute()
524 route.setRealStatusCode(globalRoute.statusCode); in updateGlobalRoute()
527 if (route.mPlaybackType != globalRoute.playbackType) { in updateGlobalRoute()
528 route.mPlaybackType = globalRoute.playbackType; in updateGlobalRoute()
531 if (route.mPlaybackStream != globalRoute.playbackStream) { in updateGlobalRoute()
532 route.mPlaybackStream = globalRoute.playbackStream; in updateGlobalRoute()
535 if (route.mVolume != globalRoute.volume) { in updateGlobalRoute()
536 route.mVolume = globalRoute.volume; in updateGlobalRoute()
540 if (route.mVolumeMax != globalRoute.volumeMax) { in updateGlobalRoute()
541 route.mVolumeMax = globalRoute.volumeMax; in updateGlobalRoute()
545 if (route.mVolumeHandling != globalRoute.volumeHandling) { in updateGlobalRoute()
546 route.mVolumeHandling = globalRoute.volumeHandling; in updateGlobalRoute()
550 if (route.mPresentationDisplayId != globalRoute.presentationDisplayId) { in updateGlobalRoute()
551 route.mPresentationDisplayId = globalRoute.presentationDisplayId; in updateGlobalRoute()
552 route.updatePresentationDisplay(); in updateGlobalRoute()
558 dispatchRouteChanged(route, oldSupportedTypes); in updateGlobalRoute()
561 dispatchRouteVolumeChanged(route); in updateGlobalRoute()
564 dispatchRoutePresentationDisplayChanged(route); in updateGlobalRoute()
571 final RouteInfo route = mRoutes.get(i); in findGlobalRoute() local
572 if (globalRouteId.equals(route.mGlobalRouteId)) { in findGlobalRoute()
573 return route; in findGlobalRoute()
796 RouteInfo route = sStatic.mRoutes.get(i); in isRouteAvailable() local
797 if (route.matchesTypes(types)) { in isRouteAvailable()
799 || route != sStatic.mDefaultAudioVideo) { in isRouteAvailable()
894 public void selectRoute(int types, @NonNull RouteInfo route) { in selectRoute() argument
895 if (route == null) { in selectRoute()
898 selectRouteStatic(types, route, true); in selectRoute()
904 public void selectRouteInt(int types, RouteInfo route, boolean explicit) { in selectRouteInt() argument
905 selectRouteStatic(types, route, explicit); in selectRouteInt()
908 static void selectRouteStatic(int types, @NonNull RouteInfo route, boolean explicit) { in selectRouteStatic() argument
909 Log.v(TAG, "Selecting route: " + route); in selectRouteStatic()
910 assert(route != null); in selectRouteStatic()
912 if (oldRoute == route) return; in selectRouteStatic()
913 if (!route.matchesTypes(types)) { in selectRouteStatic()
915 typesToString(route.getSupportedTypes()) + " into route types " + in selectRouteStatic()
922 (route == btRoute || route == sStatic.mDefaultAudioVideo)) { in selectRouteStatic()
924 sStatic.mAudioService.setBluetoothA2dpOn(route == btRoute); in selectRouteStatic()
933 final boolean newRouteHasAddress = route.mDeviceAddress != null; in selectRouteStatic()
935 if (newRouteHasAddress && !matchesDeviceAddress(activeDisplay, route)) { in selectRouteStatic()
937 sStatic.mDisplayService.connectWifiDisplay(route.mDeviceAddress); in selectRouteStatic()
947 sStatic.setSelectedRoute(route, explicit); in selectRouteStatic()
955 if (route != null) { in selectRouteStatic()
956 if (route.resolveStatusCode()) { in selectRouteStatic()
957 dispatchRouteChanged(route); in selectRouteStatic()
959 dispatchRouteSelected(types & route.getSupportedTypes(), route); in selectRouteStatic() local
1341 RouteInfo route = findWifiDisplayRoute(d); in updateWifiDisplayStatus() local
1342 if (route == null) { in updateWifiDisplayStatus()
1343 route = makeWifiDisplayRoute(d, status); in updateWifiDisplayStatus()
1344 addRouteStatic(route); in updateWifiDisplayStatus()
1349 updateWifiDisplayRoute(route, d, status, disconnected); in updateWifiDisplayStatus()
1352 selectRouteStatic(route.getSupportedTypes(), route, false); in updateWifiDisplayStatus() local
1359 RouteInfo route = sStatic.mRoutes.get(i); in updateWifiDisplayStatus() local
1360 if (route.mDeviceAddress != null) { in updateWifiDisplayStatus()
1361 WifiDisplay d = findWifiDisplay(displays, route.mDeviceAddress); in updateWifiDisplayStatus()
1363 removeRouteStatic(route); in updateWifiDisplayStatus()
1429 RouteInfo route, WifiDisplay display, WifiDisplayStatus wfdStatus, in updateWifiDisplayRoute() argument
1433 if (!route.getName().equals(newName)) { in updateWifiDisplayRoute()
1434 route.mName = newName; in updateWifiDisplayRoute()
1439 changed |= route.mEnabled != enabled; in updateWifiDisplayRoute()
1440 route.mEnabled = enabled; in updateWifiDisplayRoute()
1442 changed |= route.setRealStatusCode(getWifiDisplayStatusCode(display, wfdStatus)); in updateWifiDisplayRoute()
1445 dispatchRouteChanged(route); in updateWifiDisplayRoute()
1448 if ((!enabled || disconnected) && route.isSelected()) { in updateWifiDisplayRoute()
2033 mVcb.vcb.onVolumeUpdateRequest(mVcb.route, direction);
2035 mVcb.vcb.onVolumeSetRequest(mVcb.route, value);
2328 mVcb.vcb.onVolumeSetRequest(mVcb.route, volume); in onSetVolumeTo()
2340 mVcb.vcb.onVolumeUpdateRequest(mVcb.route, direction); in onAdjustVolume()
2372 public void addRoute(RouteInfo route) { in addRoute() argument
2373 if (route.getGroup() != null) { in addRoute()
2374 throw new IllegalStateException("Route " + route + " is already part of a group."); in addRoute()
2376 if (route.getCategory() != mCategory) { in addRoute()
2379 "(Route category=" + route.getCategory() + in addRoute()
2383 mRoutes.add(route); in addRoute()
2384 route.mGroup = this; in addRoute()
2388 dispatchRouteGrouped(route, this, at); in addRoute()
2397 public void addRoute(RouteInfo route, int insertAt) { in addRoute() argument
2398 if (route.getGroup() != null) { in addRoute()
2399 throw new IllegalStateException("Route " + route + " is already part of a group."); in addRoute()
2401 if (route.getCategory() != mCategory) { in addRoute()
2404 "(Route category=" + route.getCategory() + in addRoute()
2407 mRoutes.add(insertAt, route); in addRoute()
2408 route.mGroup = this; in addRoute()
2412 dispatchRouteGrouped(route, this, insertAt); in addRoute()
2420 public void removeRoute(RouteInfo route) { in removeRoute() argument
2421 if (route.getGroup() != this) { in removeRoute()
2422 throw new IllegalArgumentException("Route " + route + in removeRoute()
2425 mRoutes.remove(route); in removeRoute()
2426 route.mGroup = null; in removeRoute()
2429 dispatchRouteUngrouped(route, this); in removeRoute()
2439 RouteInfo route = mRoutes.remove(index); in removeRoute() local
2440 route.mGroup = null; in removeRoute()
2443 dispatchRouteUngrouped(route, this); in removeRoute()
2494 final RouteInfo route = getRouteAt(i); in requestSetVolume() local
2495 final int routeVol = (int) (scaledVolume * route.getVolumeMax()); in requestSetVolume()
2496 route.requestSetVolume(routeVol); in requestSetVolume()
2514 final RouteInfo route = getRouteAt(i); in requestUpdateVolume() local
2515 route.requestUpdateVolume(direction); in requestUpdateVolume()
2516 final int routeVol = route.getVolume(); in requestUpdateVolume()
2570 final RouteInfo route = mRoutes.get(i); in routeUpdated() local
2571 types |= route.mSupportedTypes; in routeUpdated()
2572 final int routeMaxVolume = route.getVolumeMax(); in routeUpdated()
2576 isLocal &= route.getPlaybackType() == PLAYBACK_TYPE_LOCAL; in routeUpdated()
2577 isFixedVolume &= route.getVolumeHandling() == PLAYBACK_VOLUME_FIXED; in routeUpdated()
2682 final RouteInfo route = getRouteAtStatic(i); in getRoutes() local
2683 if (route.mCategory == this) { in getRoutes()
2684 out.add(route); in getRoutes()
2737 public boolean filterRouteEvent(RouteInfo route) { in filterRouteEvent() argument
2738 return filterRouteEvent(route.mSupportedTypes); in filterRouteEvent()
2894 public final RouteInfo route; field in MediaRouter.VolumeCallbackInfo
2896 public VolumeCallbackInfo(VolumeCallback vcb, RouteInfo route) { in VolumeCallbackInfo() argument
2898 this.route = route; in VolumeCallbackInfo()