Loading media/java/android/service/media/MediaBrowserService.java +13 −12 Original line number Original line Diff line number Diff line Loading @@ -111,7 +111,7 @@ public abstract class MediaBrowserService extends Service { * All the info about a connection. * All the info about a connection. */ */ private static class ConnectionRecord implements IBinder.DeathRecipient { private static class ConnectionRecord implements IBinder.DeathRecipient { public final MediaBrowserService service; public final ServiceState serviceState; public final String pkg; public final String pkg; public final int pid; public final int pid; public final int uid; public final int uid; Loading @@ -121,9 +121,14 @@ public abstract class MediaBrowserService extends Service { public final HashMap<String, List<Pair<IBinder, Bundle>>> subscriptions = new HashMap<>(); public final HashMap<String, List<Pair<IBinder, Bundle>>> subscriptions = new HashMap<>(); ConnectionRecord( ConnectionRecord( MediaBrowserService service, String pkg, int pid, int uid, Bundle rootHints, ServiceState serviceState, IMediaBrowserServiceCallbacks callbacks, BrowserRoot root) { String pkg, this.service = service; int pid, int uid, Bundle rootHints, IMediaBrowserServiceCallbacks callbacks, BrowserRoot root) { this.serviceState = serviceState; this.pkg = pkg; this.pkg = pkg; this.pid = pid; this.pid = pid; this.uid = uid; this.uid = uid; Loading @@ -134,12 +139,8 @@ public abstract class MediaBrowserService extends Service { @Override @Override public void binderDied() { public void binderDied() { service.mHandler.post(new Runnable() { serviceState.postOnHandler( @Override () -> serviceState.mConnections.remove(callbacks.asBinder())); public void run() { service.mServiceState.mConnections.remove(callbacks.asBinder()); } }); } } } } Loading Loading @@ -706,7 +707,7 @@ public abstract class MediaBrowserService extends Service { // in onGetRoot(). // in onGetRoot(). mCurConnection = mCurConnection = new ConnectionRecord( new ConnectionRecord( /* service= */ MediaBrowserService.this, /* serviceState= */ this, pkg, pkg, pid, pid, uid, uid, Loading @@ -728,7 +729,7 @@ public abstract class MediaBrowserService extends Service { try { try { ConnectionRecord connection = ConnectionRecord connection = new ConnectionRecord( new ConnectionRecord( /* service= */ MediaBrowserService.this, /* serviceState= */ this, pkg, pkg, pid, pid, uid, uid, Loading Loading
media/java/android/service/media/MediaBrowserService.java +13 −12 Original line number Original line Diff line number Diff line Loading @@ -111,7 +111,7 @@ public abstract class MediaBrowserService extends Service { * All the info about a connection. * All the info about a connection. */ */ private static class ConnectionRecord implements IBinder.DeathRecipient { private static class ConnectionRecord implements IBinder.DeathRecipient { public final MediaBrowserService service; public final ServiceState serviceState; public final String pkg; public final String pkg; public final int pid; public final int pid; public final int uid; public final int uid; Loading @@ -121,9 +121,14 @@ public abstract class MediaBrowserService extends Service { public final HashMap<String, List<Pair<IBinder, Bundle>>> subscriptions = new HashMap<>(); public final HashMap<String, List<Pair<IBinder, Bundle>>> subscriptions = new HashMap<>(); ConnectionRecord( ConnectionRecord( MediaBrowserService service, String pkg, int pid, int uid, Bundle rootHints, ServiceState serviceState, IMediaBrowserServiceCallbacks callbacks, BrowserRoot root) { String pkg, this.service = service; int pid, int uid, Bundle rootHints, IMediaBrowserServiceCallbacks callbacks, BrowserRoot root) { this.serviceState = serviceState; this.pkg = pkg; this.pkg = pkg; this.pid = pid; this.pid = pid; this.uid = uid; this.uid = uid; Loading @@ -134,12 +139,8 @@ public abstract class MediaBrowserService extends Service { @Override @Override public void binderDied() { public void binderDied() { service.mHandler.post(new Runnable() { serviceState.postOnHandler( @Override () -> serviceState.mConnections.remove(callbacks.asBinder())); public void run() { service.mServiceState.mConnections.remove(callbacks.asBinder()); } }); } } } } Loading Loading @@ -706,7 +707,7 @@ public abstract class MediaBrowserService extends Service { // in onGetRoot(). // in onGetRoot(). mCurConnection = mCurConnection = new ConnectionRecord( new ConnectionRecord( /* service= */ MediaBrowserService.this, /* serviceState= */ this, pkg, pkg, pid, pid, uid, uid, Loading @@ -728,7 +729,7 @@ public abstract class MediaBrowserService extends Service { try { try { ConnectionRecord connection = ConnectionRecord connection = new ConnectionRecord( new ConnectionRecord( /* service= */ MediaBrowserService.this, /* serviceState= */ this, pkg, pkg, pid, pid, uid, uid, Loading