public final void a(aay paramaay) { aax localaax = paramaay.a; aao.a(); if (localaax.a != this) { Object localObject1 = this.i; Object localObject2 = this.s; MediaRouter.UserRouteInfo localUserRouteInfo = ((MediaRouter)localObject1).createUserRoute((MediaRouter.RouteCategory)localObject2); abz localabz = new abz(paramaay, localUserRouteInfo); ((MediaRouter.RouteInfo)localUserRouteInfo).setTag(localabz); Object localObject3 = this.r; ((MediaRouter.UserRouteInfo)localUserRouteInfo).setVolumeCallback((MediaRouter.VolumeCallback)localObject3); a(localabz); this.t.add(localabz); ((MediaRouter)this.i).addUserRoute((MediaRouter.UserRouteInfo)localUserRouteInfo); } int i1; do { return; i1 = g(((MediaRouter)this.i).getSelectedRoute(8388611)); } while ((i1 < 0) || (!((aby)this.n.get(i1)).b.equals(paramaay.b))); aao.a(); aao.b.a(paramaay, 3); }
protected void a(aby paramaby, aad paramaad) { int i1 = ((MediaRouter.RouteInfo)paramaby.a).getSupportedTypes(); if ((i1 & 0x1) != 0) { paramaad.a(o); } if ((i1 & 0x2) != 0) { paramaad.a(p); } int i2 = ((MediaRouter.RouteInfo)paramaby.a).getPlaybackType(); paramaad.a.putInt("playbackType", i2); int i3 = ((MediaRouter.RouteInfo)paramaby.a).getPlaybackStream(); paramaad.a.putInt("playbackStream", i3); int i4 = ((MediaRouter.RouteInfo)paramaby.a).getVolume(); paramaad.a.putInt("volume", i4); int i5 = ((MediaRouter.RouteInfo)paramaby.a).getVolumeMax(); paramaad.a.putInt("volumeMax", i5); int i6 = ((MediaRouter.RouteInfo)paramaby.a).getVolumeHandling(); paramaad.a.putInt("volumeHandling", i6); }
public final void b(aay paramaay) { aax localaax = paramaay.a; aao.a(); if (localaax.a != this) { int i1 = e(paramaay); if (i1 >= 0) { abz localabz = (abz)this.t.remove(i1); ((MediaRouter.RouteInfo)localabz.b).setTag(null); ((MediaRouter.UserRouteInfo)localabz.b).setVolumeCallback((MediaRouter.VolumeCallback)null); Object localObject1 = this.i; Object localObject2 = localabz.b; ((MediaRouter)localObject1).removeUserRoute((MediaRouter.UserRouteInfo)localObject2); } } }
public final void e(Object paramObject) { if (i(paramObject) == null) { int i1 = g(paramObject); if (i1 >= 0) { aby localaby = (aby)this.n.get(i1); int i2 = ((MediaRouter.RouteInfo)paramObject).getVolume(); if (i2 != localaby.c.a.getInt("volume")) { aad localaad = new aad(localaby.c); localaad.a.putInt("volume", i2); localaby.c = localaad.a(); a(); } } } }
protected void a(aby paramaby, aad paramaad) { super.a(paramaby, paramaad); if (!((MediaRouter.RouteInfo)paramaby.a).isEnabled()) { paramaad.a.putBoolean("enabled", false); } if (a(paramaby)) { paramaad.a.putBoolean("connecting", true); } Display localDisplay = ((MediaRouter.RouteInfo)paramaby.a).getPresentationDisplay(); if (localDisplay != null) { int i = localDisplay.getDisplayId(); paramaad.a.putInt("presentationDisplayId", i); } }
public final void f(Object paramObject) { int i = g(paramObject); aby localaby; Display localDisplay; if (i >= 0) { localaby = (aby)this.n.get(i); localDisplay = ((MediaRouter.RouteInfo)paramObject).getPresentationDisplay(); if (localDisplay == null) { break label100; } } label100: for (int j = localDisplay.getDisplayId();; j = -1) { if (j != localaby.c.a.getInt("presentationDisplayId", -1)) { aad localaad = new aad(localaby.c); localaad.a.putInt("presentationDisplayId", j); localaby.c = localaad.a(); a(); } return; } }
public final boolean a(Object paramObject) { MediaRouter.RouteInfo localRouteInfo = (MediaRouter.RouteInfo)paramObject; if (this.a != null) {} try { int i = ((Integer)this.a.invoke(localRouteInfo, new Object[0])).intValue(); int j = this.b; return i == j; } catch (InvocationTargetException localInvocationTargetException) { return false; } catch (IllegalAccessException localIllegalAccessException) { label51: break label51; } }
private void updatePresentation() { MediaRouter.RouteInfo route = mediaRouter .getSelectedRoute(MediaRouter.ROUTE_TYPE_LIVE_VIDEO); Display presentationDisplay = route != null ? route .getPresentationDisplay() : null; if (displayPresentation != null && displayPresentation.getDisplay() != presentationDisplay) { displayPresentation.dismiss(); displayPresentation = null; } if (displayPresentation == null && presentationDisplay != null) { displayPresentation = new DisplayPresentation(this, presentationDisplay); displayPresentation.setOnDismissListener( new OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { if (dialog == displayPresentation) { displayPresentation = null; } } } ); displayPresentation.show(); displayPresentation.go(displayLayout.getCurrentSlidePos(), displayLayout.getCurrentSlidePhase()); } }
private static abz i(Object paramObject) { Object localObject = ((MediaRouter.RouteInfo)paramObject).getTag(); if ((localObject instanceof abz)) { return (abz)localObject; } return null; }
private String j(Object paramObject) { Context localContext = this.a; CharSequence localCharSequence = ((MediaRouter.RouteInfo)paramObject).getName(localContext); if (localCharSequence != null) { return localCharSequence.toString(); } return ""; }
protected void h(Object paramObject) { if (this.u == null) { this.u = new abc(); } abc localabc = this.u; MediaRouter localMediaRouter = (MediaRouter)this.i; MediaRouter.RouteInfo localRouteInfo = (MediaRouter.RouteInfo)paramObject; if (((0x800000 & localRouteInfo.getSupportedTypes()) == 0) && (localabc.a != null)) {} try { Method localMethod = localabc.a; Object[] arrayOfObject = new Object[2]; arrayOfObject[0] = Integer.valueOf(8388611); arrayOfObject[1] = localRouteInfo; localMethod.invoke(localMediaRouter, arrayOfObject); return; } catch (InvocationTargetException localInvocationTargetException) { localMediaRouter.selectRoute(8388611, localRouteInfo); return; } catch (IllegalAccessException localIllegalAccessException) { label96: break label96; } }
protected final void a(aby paramaby, aad paramaad) { super.a(paramaby, paramaad); CharSequence localCharSequence = ((MediaRouter.RouteInfo)paramaby.a).getDescription(); if (localCharSequence != null) { String str = localCharSequence.toString(); paramaad.a.putString("status", str); } }
public abc() { if ((Build.VERSION.SDK_INT < 16) || (Build.VERSION.SDK_INT > 17)) { throw new UnsupportedOperationException(); } try { Class[] arrayOfClass = new Class[2]; arrayOfClass[0] = Integer.TYPE; arrayOfClass[1] = MediaRouter.RouteInfo.class; this.a = MediaRouter.class.getMethod("selectRouteInt", arrayOfClass); return; } catch (NoSuchMethodException localNoSuchMethodException) {} }
public abi() { if (Build.VERSION.SDK_INT != 17) { throw new UnsupportedOperationException(); } try { this.b = MediaRouter.RouteInfo.class.getField("STATUS_CONNECTING").getInt(null); this.a = MediaRouter.RouteInfo.class.getMethod("getStatusCode", new Class[0]); return; } catch (IllegalAccessException localIllegalAccessException) {}catch (NoSuchMethodException localNoSuchMethodException) {}catch (NoSuchFieldException localNoSuchFieldException) {} }
private void updatePresentation() { // Get the current route and its presentation display. MediaRouter.RouteInfo route = mMediaRouter.getSelectedRoute( MediaRouter.ROUTE_TYPE_LIVE_VIDEO); Display presentationDisplay = route != null ? route.getPresentationDisplay() : null; // Dismiss the current presentation if the display has changed. if (mPresentation != null && mPresentation.getDisplay() != presentationDisplay) { Log.i(TAG, "Dismissing presentation because the current route no longer " + "has a presentation display."); mPresentation.dismiss(); mPresentation = null; } // Show a new presentation if needed. if (mPresentation == null && presentationDisplay != null) { Log.i(TAG, "Showing presentation on display: " + presentationDisplay); mPresentation = new DemoPresentation(this, presentationDisplay); mPresentation.setOnDismissListener(mOnDismissListener); try { mPresentation.show(); } catch (WindowManager.InvalidDisplayException ex) { Log.w(TAG, "Couldn't show presentation! Display was removed in " + "the meantime.", ex); mPresentation = null; } } // Update the contents playing in this activity. updateContents(); }
public void onRoutePresentationDisplayChanged(MediaRouter router, RouteInfo info) { updatePresentation(); }
public void onRouteAdded(MediaRouter paramMediaRouter, MediaRouter.RouteInfo paramRouteInfo) { this.a.b(paramRouteInfo); }
public void onRouteChanged(MediaRouter paramMediaRouter, MediaRouter.RouteInfo paramRouteInfo) { this.a.d(paramRouteInfo); }
public void onRouteRemoved(MediaRouter paramMediaRouter, MediaRouter.RouteInfo paramRouteInfo) { this.a.c(paramRouteInfo); }
public void onRouteSelected(MediaRouter paramMediaRouter, int paramInt, MediaRouter.RouteInfo paramRouteInfo) { this.a.a(paramRouteInfo); }
public void onRouteVolumeChanged(MediaRouter paramMediaRouter, MediaRouter.RouteInfo paramRouteInfo) { this.a.e(paramRouteInfo); }
protected final boolean a(aby paramaby) { return ((MediaRouter.RouteInfo)paramaby.a).isConnecting(); }
protected final void h(Object paramObject) { ((MediaRouter)this.i).selectRoute(8388611, (MediaRouter.RouteInfo)paramObject); }
public final void b(int paramInt) { ((MediaRouter.RouteInfo)this.a).requestSetVolume(paramInt); }
public final void c(int paramInt) { ((MediaRouter.RouteInfo)this.a).requestUpdateVolume(paramInt); }
public final void onVolumeSetRequest(MediaRouter.RouteInfo paramRouteInfo, int paramInt) { this.a.a(paramRouteInfo, paramInt); }
public final void onVolumeUpdateRequest(MediaRouter.RouteInfo paramRouteInfo, int paramInt) { this.a.b(paramRouteInfo, paramInt); }
public final void onRoutePresentationDisplayChanged(MediaRouter paramMediaRouter, MediaRouter.RouteInfo paramRouteInfo) { ((abg)this.a).f(paramRouteInfo); }
@Override public void onRouteSelected(MediaRouter router, int type, RouteInfo info) { Log.d(TAG, "onRouteSelected: type=" + type + ", info=" + info); updatePresentation(); }
@Override public void onRouteUnselected(MediaRouter router, int type, RouteInfo info) { Log.d(TAG, "onRouteUnselected: type=" + type + ", info=" + info); updatePresentation(); }
@Override public void onRoutePresentationDisplayChanged(MediaRouter router, RouteInfo info) { Log.d(TAG, "onRoutePresentationDisplayChanged: info=" + info); updatePresentation(); }