示例#1
0
 public boolean presentationRouteSelected() {
   boolean ret = false;
   MediaRouter.RouteInfo info = mMediaRouter.getSelectedRoute(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);
   Display pD = info.getPresentationDisplay();
   if (pD != null && pD.getDisplayId() != Display.DEFAULT_DISPLAY) {
     ret = true;
   }
   return ret;
 }
示例#2
0
  void updateRemoteIndicator() {
    final RouteInfo selected = mRouter.getSelectedRoute(mRouteTypes);
    final boolean isRemote = selected != mRouter.getSystemAudioRoute();
    final boolean isConnecting = selected.getStatusCode() == RouteInfo.STATUS_CONNECTING;

    boolean needsRefresh = false;
    if (mRemoteActive != isRemote) {
      mRemoteActive = isRemote;
      needsRefresh = true;
    }
    if (mIsConnecting != isConnecting) {
      mIsConnecting = isConnecting;
      needsRefresh = true;
    }

    if (needsRefresh) {
      refreshDrawableState();
    }
  }