Loading media/java/android/media/MediaRouter2.java +21 −8 Original line number Diff line number Diff line Loading @@ -439,14 +439,7 @@ public final class MediaRouter2 { * call is ignored because the app is in the background. */ public boolean showSystemOutputSwitcher() { synchronized (mLock) { try { return mMediaRouterService.showMediaOutputSwitcher(mImpl.getPackageName()); } catch (RemoteException ex) { ex.rethrowFromSystemServer(); } } return false; return mImpl.showSystemOutputSwitcher(); } /** Loading Loading @@ -1950,6 +1943,8 @@ public final class MediaRouter2 { void setRouteListingPreference(@Nullable RouteListingPreference preference); boolean showSystemOutputSwitcher(); List<MediaRoute2Info> getAllRoutes(); void setOnGetControllerHintsListener(OnGetControllerHintsListener listener); Loading Loading @@ -2096,6 +2091,12 @@ public final class MediaRouter2 { "RouteListingPreference cannot be set by a privileged MediaRouter2 instance."); } @Override public boolean showSystemOutputSwitcher() { throw new UnsupportedOperationException( "Cannot show system output switcher from a privileged router."); } /** Gets the list of all discovered routes. */ @Override public List<MediaRoute2Info> getAllRoutes() { Loading Loading @@ -2908,6 +2909,18 @@ public final class MediaRouter2 { } } @Override public boolean showSystemOutputSwitcher() { synchronized (mLock) { try { return mMediaRouterService.showMediaOutputSwitcher(mImpl.getPackageName()); } catch (RemoteException ex) { ex.rethrowFromSystemServer(); } } return false; } /** * Returns {@link Collections#emptyList()}. Local routes can only access routes related to * their {@link RouteDiscoveryPreference} through {@link #getRoutes()}. Loading Loading
media/java/android/media/MediaRouter2.java +21 −8 Original line number Diff line number Diff line Loading @@ -439,14 +439,7 @@ public final class MediaRouter2 { * call is ignored because the app is in the background. */ public boolean showSystemOutputSwitcher() { synchronized (mLock) { try { return mMediaRouterService.showMediaOutputSwitcher(mImpl.getPackageName()); } catch (RemoteException ex) { ex.rethrowFromSystemServer(); } } return false; return mImpl.showSystemOutputSwitcher(); } /** Loading Loading @@ -1950,6 +1943,8 @@ public final class MediaRouter2 { void setRouteListingPreference(@Nullable RouteListingPreference preference); boolean showSystemOutputSwitcher(); List<MediaRoute2Info> getAllRoutes(); void setOnGetControllerHintsListener(OnGetControllerHintsListener listener); Loading Loading @@ -2096,6 +2091,12 @@ public final class MediaRouter2 { "RouteListingPreference cannot be set by a privileged MediaRouter2 instance."); } @Override public boolean showSystemOutputSwitcher() { throw new UnsupportedOperationException( "Cannot show system output switcher from a privileged router."); } /** Gets the list of all discovered routes. */ @Override public List<MediaRoute2Info> getAllRoutes() { Loading Loading @@ -2908,6 +2909,18 @@ public final class MediaRouter2 { } } @Override public boolean showSystemOutputSwitcher() { synchronized (mLock) { try { return mMediaRouterService.showMediaOutputSwitcher(mImpl.getPackageName()); } catch (RemoteException ex) { ex.rethrowFromSystemServer(); } } return false; } /** * Returns {@link Collections#emptyList()}. Local routes can only access routes related to * their {@link RouteDiscoveryPreference} through {@link #getRoutes()}. Loading