Loading media/java/android/media/MediaRouter2.java +6 −6 Original line number Diff line number Diff line Loading @@ -305,7 +305,7 @@ public final class MediaRouter2 { currentSystemRoutes = mMediaRouterService.getSystemRoutes(); currentSystemSessionInfo = mMediaRouterService.getSystemSessionInfo(); } catch (RemoteException ex) { Log.e(TAG, "Unable to get current system's routes / session info", ex); ex.rethrowFromSystemServer(); } if (currentSystemRoutes == null || currentSystemRoutes.isEmpty()) { Loading Loading @@ -407,14 +407,14 @@ public final class MediaRouter2 { mMediaRouterService.registerRouter2(stub, mPackageName); mStub = stub; } catch (RemoteException ex) { Log.e(TAG, "registerRouteCallback: Unable to register MediaRouter2.", ex); ex.rethrowFromSystemServer(); } } if (mStub != null && updateDiscoveryPreferenceIfNeededLocked()) { try { mMediaRouterService.setDiscoveryRequestWithRouter2(mStub, mDiscoveryPreference); } catch (RemoteException ex) { Log.e(TAG, "registerRouteCallback: Unable to set discovery request.", ex); ex.rethrowFromSystemServer(); } } } Loading Loading @@ -454,7 +454,7 @@ public final class MediaRouter2 { try { mMediaRouterService.unregisterRouter2(mStub); } catch (RemoteException ex) { Log.e(TAG, "Unable to unregister media router.", ex); ex.rethrowFromSystemServer(); } mStub = null; } Loading Loading @@ -1769,7 +1769,7 @@ public final class MediaRouter2 { try { mMediaRouterService.releaseSessionWithRouter2(mStub, getId()); } catch (RemoteException ex) { Log.e(TAG, "Unable to release session", ex); ex.rethrowFromSystemServer(); } } Loading @@ -1787,7 +1787,7 @@ public final class MediaRouter2 { try { mMediaRouterService.unregisterRouter2(mStub); } catch (RemoteException ex) { Log.e(TAG, "releaseInternal: Unable to unregister media router.", ex); ex.rethrowFromSystemServer(); } mStub = null; } Loading services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java +3 −0 Original line number Diff line number Diff line Loading @@ -348,6 +348,9 @@ class MediaRouter2ServiceImpl { @NonNull String uniqueSessionId, int volume) { Objects.requireNonNull(router, "router must not be null"); Objects.requireNonNull(uniqueSessionId, "uniqueSessionId must not be null"); if (TextUtils.isEmpty(uniqueSessionId)) { throw new IllegalArgumentException("uniqueSessionId must not be empty"); } final long token = Binder.clearCallingIdentity(); try { Loading Loading
media/java/android/media/MediaRouter2.java +6 −6 Original line number Diff line number Diff line Loading @@ -305,7 +305,7 @@ public final class MediaRouter2 { currentSystemRoutes = mMediaRouterService.getSystemRoutes(); currentSystemSessionInfo = mMediaRouterService.getSystemSessionInfo(); } catch (RemoteException ex) { Log.e(TAG, "Unable to get current system's routes / session info", ex); ex.rethrowFromSystemServer(); } if (currentSystemRoutes == null || currentSystemRoutes.isEmpty()) { Loading Loading @@ -407,14 +407,14 @@ public final class MediaRouter2 { mMediaRouterService.registerRouter2(stub, mPackageName); mStub = stub; } catch (RemoteException ex) { Log.e(TAG, "registerRouteCallback: Unable to register MediaRouter2.", ex); ex.rethrowFromSystemServer(); } } if (mStub != null && updateDiscoveryPreferenceIfNeededLocked()) { try { mMediaRouterService.setDiscoveryRequestWithRouter2(mStub, mDiscoveryPreference); } catch (RemoteException ex) { Log.e(TAG, "registerRouteCallback: Unable to set discovery request.", ex); ex.rethrowFromSystemServer(); } } } Loading Loading @@ -454,7 +454,7 @@ public final class MediaRouter2 { try { mMediaRouterService.unregisterRouter2(mStub); } catch (RemoteException ex) { Log.e(TAG, "Unable to unregister media router.", ex); ex.rethrowFromSystemServer(); } mStub = null; } Loading Loading @@ -1769,7 +1769,7 @@ public final class MediaRouter2 { try { mMediaRouterService.releaseSessionWithRouter2(mStub, getId()); } catch (RemoteException ex) { Log.e(TAG, "Unable to release session", ex); ex.rethrowFromSystemServer(); } } Loading @@ -1787,7 +1787,7 @@ public final class MediaRouter2 { try { mMediaRouterService.unregisterRouter2(mStub); } catch (RemoteException ex) { Log.e(TAG, "releaseInternal: Unable to unregister media router.", ex); ex.rethrowFromSystemServer(); } mStub = null; } Loading
services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java +3 −0 Original line number Diff line number Diff line Loading @@ -348,6 +348,9 @@ class MediaRouter2ServiceImpl { @NonNull String uniqueSessionId, int volume) { Objects.requireNonNull(router, "router must not be null"); Objects.requireNonNull(uniqueSessionId, "uniqueSessionId must not be null"); if (TextUtils.isEmpty(uniqueSessionId)) { throw new IllegalArgumentException("uniqueSessionId must not be empty"); } final long token = Binder.clearCallingIdentity(); try { Loading