Loading services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java +24 −25 Original line number Diff line number Diff line Loading @@ -1112,19 +1112,12 @@ class MediaRouter2ServiceImpl { continue; } Log.w( TAG, TextUtils.formatSimple( "Revoking access to manager record id: %d, package: %s, userId:" + " %d", manager.mManagerId, manager.mOwnerPackageName, userRecord.mUserId)); Slog.w(TAG, "Revoking access for " + manager.getDebugString()); unregisterManagerLocked(manager.mManager, /* died */ false); try { manager.mManager.invalidateInstance(); } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify manager= " + manager + " of permission revocation."); manager.logRemoteException("invalidateInstance", ex); } } } Loading Loading @@ -2428,10 +2421,7 @@ class MediaRouter2ServiceImpl { try { mManager.notifyRequestFailed(requestId, reason); } catch (RemoteException ex) { Slog.w( TAG, "Failed to notify manager of the request failure. Manager probably died.", ex); logRemoteException("notifyRequestFailed", ex); } } Loading @@ -2444,7 +2434,7 @@ class MediaRouter2ServiceImpl { try { mManager.notifyRoutesUpdated(routes); } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify routes. Manager probably died.", ex); logRemoteException("notifyRoutesUpdated", ex); } } Loading @@ -2457,10 +2447,7 @@ class MediaRouter2ServiceImpl { try { mManager.notifySessionUpdated(sessionInfo); } catch (RemoteException ex) { Slog.w( TAG, "notifySessionUpdatedToManagers: Failed to notify. Manager probably died.", ex); logRemoteException("notifySessionUpdated", ex); } } Loading @@ -2473,13 +2460,18 @@ class MediaRouter2ServiceImpl { try { mManager.notifySessionReleased(sessionInfo); } catch (RemoteException ex) { Slog.w( TAG, "notifySessionReleasedToManagers: Failed to notify. Manager probably died.", ex); logRemoteException("notifySessionReleased", ex); } } 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); } private void updateScanningState(@ScanningState int scanningState) { if (mScanningState == scanningState) { return; Loading @@ -2492,9 +2484,16 @@ class MediaRouter2ServiceImpl { UserHandler::updateDiscoveryPreferenceOnHandler, mUserRecord.mHandler)); } @Override public String toString() { return "Manager " + mOwnerPackageName + " (pid " + mOwnerPid + ")"; /** Returns a human readable representation of this manager record for logging purposes. */ public String getDebugString() { return TextUtils.formatSimple( "Manager %s (id=%d,pid=%d,userId=%d,uid=%d,targetPkg=%s)", mOwnerPackageName, mManagerId, mOwnerPid, mUserRecord.mUserId, mOwnerUid, mTargetPackageName); } } Loading Loading
services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java +24 −25 Original line number Diff line number Diff line Loading @@ -1112,19 +1112,12 @@ class MediaRouter2ServiceImpl { continue; } Log.w( TAG, TextUtils.formatSimple( "Revoking access to manager record id: %d, package: %s, userId:" + " %d", manager.mManagerId, manager.mOwnerPackageName, userRecord.mUserId)); Slog.w(TAG, "Revoking access for " + manager.getDebugString()); unregisterManagerLocked(manager.mManager, /* died */ false); try { manager.mManager.invalidateInstance(); } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify manager= " + manager + " of permission revocation."); manager.logRemoteException("invalidateInstance", ex); } } } Loading Loading @@ -2428,10 +2421,7 @@ class MediaRouter2ServiceImpl { try { mManager.notifyRequestFailed(requestId, reason); } catch (RemoteException ex) { Slog.w( TAG, "Failed to notify manager of the request failure. Manager probably died.", ex); logRemoteException("notifyRequestFailed", ex); } } Loading @@ -2444,7 +2434,7 @@ class MediaRouter2ServiceImpl { try { mManager.notifyRoutesUpdated(routes); } catch (RemoteException ex) { Slog.w(TAG, "Failed to notify routes. Manager probably died.", ex); logRemoteException("notifyRoutesUpdated", ex); } } Loading @@ -2457,10 +2447,7 @@ class MediaRouter2ServiceImpl { try { mManager.notifySessionUpdated(sessionInfo); } catch (RemoteException ex) { Slog.w( TAG, "notifySessionUpdatedToManagers: Failed to notify. Manager probably died.", ex); logRemoteException("notifySessionUpdated", ex); } } Loading @@ -2473,13 +2460,18 @@ class MediaRouter2ServiceImpl { try { mManager.notifySessionReleased(sessionInfo); } catch (RemoteException ex) { Slog.w( TAG, "notifySessionReleasedToManagers: Failed to notify. Manager probably died.", ex); logRemoteException("notifySessionReleased", ex); } } 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); } private void updateScanningState(@ScanningState int scanningState) { if (mScanningState == scanningState) { return; Loading @@ -2492,9 +2484,16 @@ class MediaRouter2ServiceImpl { UserHandler::updateDiscoveryPreferenceOnHandler, mUserRecord.mHandler)); } @Override public String toString() { return "Manager " + mOwnerPackageName + " (pid " + mOwnerPid + ")"; /** Returns a human readable representation of this manager record for logging purposes. */ public String getDebugString() { return TextUtils.formatSimple( "Manager %s (id=%d,pid=%d,userId=%d,uid=%d,targetPkg=%s)", mOwnerPackageName, mManagerId, mOwnerPid, mUserRecord.mUserId, mOwnerUid, mTargetPackageName); } } Loading