Loading services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java +23 −22 Original line number Original line Diff line number Diff line Loading @@ -2197,7 +2197,7 @@ class MediaRouter2ServiceImpl { mRouter.notifyRouterRegistered( mRouter.notifyRouterRegistered( getVisibleRoutes(currentRoutes), currentSystemSessionInfo); getVisibleRoutes(currentRoutes), currentSystemSessionInfo); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify router registered. Router probably died.", ex); logRemoteException("notifyRegistered", ex); } } } } Loading @@ -2212,7 +2212,7 @@ class MediaRouter2ServiceImpl { try { try { mRouter.notifyRoutesUpdated(getVisibleRoutes(routes)); mRouter.notifyRoutesUpdated(getVisibleRoutes(routes)); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify routes updated. Router probably died.", ex); logRemoteException("notifyRoutesUpdated", ex); } } } } Loading @@ -2221,11 +2221,7 @@ class MediaRouter2ServiceImpl { mRouter.notifySessionCreated( mRouter.notifySessionCreated( requestId, maybeClearTransferInitiatorIdentity(sessionInfo)); requestId, maybeClearTransferInitiatorIdentity(sessionInfo)); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w( logRemoteException("notifySessionCreated", ex); TAG, "Failed to notify router of the session creation." + " Router probably died.", ex); } } } } Loading @@ -2238,11 +2234,7 @@ class MediaRouter2ServiceImpl { try { try { mRouter.notifySessionCreated(requestId, /* sessionInfo= */ null); mRouter.notifySessionCreated(requestId, /* sessionInfo= */ null); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w( logRemoteException("notifySessionCreationFailed", ex); TAG, "Failed to notify router of the session creation failure." + " Router probably died.", ex); } } } } Loading @@ -2253,10 +2245,7 @@ class MediaRouter2ServiceImpl { try { try { mRouter.notifySessionReleased(sessionInfo); mRouter.notifySessionReleased(sessionInfo); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w( logRemoteException("notifySessionReleased", ex); TAG, "Failed to notify router of the session release. Router probably died.", ex); } } } } Loading Loading @@ -2284,11 +2273,7 @@ class MediaRouter2ServiceImpl { } } mRouter.requestCreateSessionByManager(uniqueRequestId, oldSession, route); mRouter.requestCreateSessionByManager(uniqueRequestId, oldSession, route); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w( logRemoteException("requestCreateSessionByManager", ex); TAG, "getSessionHintsForCreatingSessionOnHandler: " + "Failed to request. Router probably died.", ex); managerRecord.notifyRequestFailed( managerRecord.notifyRequestFailed( toOriginalRequestId(uniqueRequestId), REASON_UNKNOWN_ERROR); toOriginalRequestId(uniqueRequestId), REASON_UNKNOWN_ERROR); } } Loading @@ -2303,7 +2288,7 @@ class MediaRouter2ServiceImpl { try { try { mRouter.notifySessionInfoChanged(maybeClearTransferInitiatorIdentity(sessionInfo)); mRouter.notifySessionInfoChanged(maybeClearTransferInitiatorIdentity(sessionInfo)); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify session info changed. Router probably died.", ex); logRemoteException("notifySessionInfoChanged", ex); } } } } Loading Loading @@ -2362,6 +2347,22 @@ class MediaRouter2ServiceImpl { } } return false; return false; } } /** Logs a {@link RemoteException} occurred during the execution of {@code operation}. */ private void logRemoteException(String operation, RemoteException exception) { String message = TextUtils.formatSimple( "%s failed for %s due to %s", operation, getDebugString(), exception.toString()); Slog.w(TAG, message); } /** Returns a human readable representation of this router record for logging purposes. */ private String getDebugString() { return TextUtils.formatSimple( "Router %s (id=%d,pid=%d,userId=%d,uid=%d)", mPackageName, mRouterId, mPid, mUserRecord.mUserId, mUid); } } } final class ManagerRecord implements IBinder.DeathRecipient { final class ManagerRecord implements IBinder.DeathRecipient { Loading Loading
services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java +23 −22 Original line number Original line Diff line number Diff line Loading @@ -2197,7 +2197,7 @@ class MediaRouter2ServiceImpl { mRouter.notifyRouterRegistered( mRouter.notifyRouterRegistered( getVisibleRoutes(currentRoutes), currentSystemSessionInfo); getVisibleRoutes(currentRoutes), currentSystemSessionInfo); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify router registered. Router probably died.", ex); logRemoteException("notifyRegistered", ex); } } } } Loading @@ -2212,7 +2212,7 @@ class MediaRouter2ServiceImpl { try { try { mRouter.notifyRoutesUpdated(getVisibleRoutes(routes)); mRouter.notifyRoutesUpdated(getVisibleRoutes(routes)); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify routes updated. Router probably died.", ex); logRemoteException("notifyRoutesUpdated", ex); } } } } Loading @@ -2221,11 +2221,7 @@ class MediaRouter2ServiceImpl { mRouter.notifySessionCreated( mRouter.notifySessionCreated( requestId, maybeClearTransferInitiatorIdentity(sessionInfo)); requestId, maybeClearTransferInitiatorIdentity(sessionInfo)); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w( logRemoteException("notifySessionCreated", ex); TAG, "Failed to notify router of the session creation." + " Router probably died.", ex); } } } } Loading @@ -2238,11 +2234,7 @@ class MediaRouter2ServiceImpl { try { try { mRouter.notifySessionCreated(requestId, /* sessionInfo= */ null); mRouter.notifySessionCreated(requestId, /* sessionInfo= */ null); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w( logRemoteException("notifySessionCreationFailed", ex); TAG, "Failed to notify router of the session creation failure." + " Router probably died.", ex); } } } } Loading @@ -2253,10 +2245,7 @@ class MediaRouter2ServiceImpl { try { try { mRouter.notifySessionReleased(sessionInfo); mRouter.notifySessionReleased(sessionInfo); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w( logRemoteException("notifySessionReleased", ex); TAG, "Failed to notify router of the session release. Router probably died.", ex); } } } } Loading Loading @@ -2284,11 +2273,7 @@ class MediaRouter2ServiceImpl { } } mRouter.requestCreateSessionByManager(uniqueRequestId, oldSession, route); mRouter.requestCreateSessionByManager(uniqueRequestId, oldSession, route); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w( logRemoteException("requestCreateSessionByManager", ex); TAG, "getSessionHintsForCreatingSessionOnHandler: " + "Failed to request. Router probably died.", ex); managerRecord.notifyRequestFailed( managerRecord.notifyRequestFailed( toOriginalRequestId(uniqueRequestId), REASON_UNKNOWN_ERROR); toOriginalRequestId(uniqueRequestId), REASON_UNKNOWN_ERROR); } } Loading @@ -2303,7 +2288,7 @@ class MediaRouter2ServiceImpl { try { try { mRouter.notifySessionInfoChanged(maybeClearTransferInitiatorIdentity(sessionInfo)); mRouter.notifySessionInfoChanged(maybeClearTransferInitiatorIdentity(sessionInfo)); } catch (RemoteException ex) { } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify session info changed. Router probably died.", ex); logRemoteException("notifySessionInfoChanged", ex); } } } } Loading Loading @@ -2362,6 +2347,22 @@ class MediaRouter2ServiceImpl { } } return false; return false; } } /** Logs a {@link RemoteException} occurred during the execution of {@code operation}. */ private void logRemoteException(String operation, RemoteException exception) { String message = TextUtils.formatSimple( "%s failed for %s due to %s", operation, getDebugString(), exception.toString()); Slog.w(TAG, message); } /** Returns a human readable representation of this router record for logging purposes. */ private String getDebugString() { return TextUtils.formatSimple( "Router %s (id=%d,pid=%d,userId=%d,uid=%d)", mPackageName, mRouterId, mPid, mUserRecord.mUserId, mUid); } } } final class ManagerRecord implements IBinder.DeathRecipient { final class ManagerRecord implements IBinder.DeathRecipient { Loading