Loading telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java +28 −20 Original line number Diff line number Diff line Loading @@ -118,14 +118,8 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { } final int uid = Binder.getCallingUid(); callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); return initialize(subscriptionId, new MbmsDownloadSessionCallback() { int result = initialize(subscriptionId, new MbmsDownloadSessionCallback() { @Override public void onError(int errorCode, String message) { try { Loading Loading @@ -153,6 +147,17 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { } } }); if (result == MbmsErrors.SUCCESS) { callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); } return result; } /** Loading Loading @@ -251,6 +256,16 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { throw new NullPointerException("Callback must not be null"); } DownloadStateCallback exposedCallback = new FilteredDownloadStateCallback(callback, flags) { @Override protected void onRemoteException(RemoteException e) { onAppCallbackDied(uid, downloadRequest.getSubscriptionId()); } }; int result = registerStateCallback(downloadRequest, exposedCallback); if (result == MbmsErrors.SUCCESS) { DeathRecipient deathRecipient = new DeathRecipient() { @Override public void binderDied() { Loading @@ -261,17 +276,10 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { }; mDownloadCallbackDeathRecipients.put(callback.asBinder(), deathRecipient); callback.asBinder().linkToDeath(deathRecipient, 0); DownloadStateCallback exposedCallback = new FilteredDownloadStateCallback(callback, flags) { @Override protected void onRemoteException(RemoteException e) { onAppCallbackDied(uid, downloadRequest.getSubscriptionId()); } }; mDownloadCallbackBinderMap.put(callback.asBinder(), exposedCallback); } return registerStateCallback(downloadRequest, exposedCallback); return result; } /** Loading telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java +24 −14 Original line number Diff line number Diff line Loading @@ -70,14 +70,8 @@ public class MbmsStreamingServiceBase extends IMbmsStreamingService.Stub { } final int uid = Binder.getCallingUid(); callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); return initialize(new MbmsStreamingSessionCallback() { int result = initialize(new MbmsStreamingSessionCallback() { @Override public void onError(final int errorCode, final String message) { try { Loading Loading @@ -105,6 +99,17 @@ public class MbmsStreamingServiceBase extends IMbmsStreamingService.Stub { } } }, subscriptionId); if (result == MbmsErrors.SUCCESS) { callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); } return result; } Loading Loading @@ -161,14 +166,8 @@ public class MbmsStreamingServiceBase extends IMbmsStreamingService.Stub { } final int uid = Binder.getCallingUid(); callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); return startStreaming(subscriptionId, serviceId, new StreamingServiceCallback() { int result = startStreaming(subscriptionId, serviceId, new StreamingServiceCallback() { @Override public void onError(final int errorCode, final String message) { try { Loading Loading @@ -215,6 +214,17 @@ public class MbmsStreamingServiceBase extends IMbmsStreamingService.Stub { } } }); if (result == MbmsErrors.SUCCESS) { callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); } return result; } /** Loading Loading
telephony/java/android/telephony/mbms/vendor/MbmsDownloadServiceBase.java +28 −20 Original line number Diff line number Diff line Loading @@ -118,14 +118,8 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { } final int uid = Binder.getCallingUid(); callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); return initialize(subscriptionId, new MbmsDownloadSessionCallback() { int result = initialize(subscriptionId, new MbmsDownloadSessionCallback() { @Override public void onError(int errorCode, String message) { try { Loading Loading @@ -153,6 +147,17 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { } } }); if (result == MbmsErrors.SUCCESS) { callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); } return result; } /** Loading Loading @@ -251,6 +256,16 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { throw new NullPointerException("Callback must not be null"); } DownloadStateCallback exposedCallback = new FilteredDownloadStateCallback(callback, flags) { @Override protected void onRemoteException(RemoteException e) { onAppCallbackDied(uid, downloadRequest.getSubscriptionId()); } }; int result = registerStateCallback(downloadRequest, exposedCallback); if (result == MbmsErrors.SUCCESS) { DeathRecipient deathRecipient = new DeathRecipient() { @Override public void binderDied() { Loading @@ -261,17 +276,10 @@ public class MbmsDownloadServiceBase extends IMbmsDownloadService.Stub { }; mDownloadCallbackDeathRecipients.put(callback.asBinder(), deathRecipient); callback.asBinder().linkToDeath(deathRecipient, 0); DownloadStateCallback exposedCallback = new FilteredDownloadStateCallback(callback, flags) { @Override protected void onRemoteException(RemoteException e) { onAppCallbackDied(uid, downloadRequest.getSubscriptionId()); } }; mDownloadCallbackBinderMap.put(callback.asBinder(), exposedCallback); } return registerStateCallback(downloadRequest, exposedCallback); return result; } /** Loading
telephony/java/android/telephony/mbms/vendor/MbmsStreamingServiceBase.java +24 −14 Original line number Diff line number Diff line Loading @@ -70,14 +70,8 @@ public class MbmsStreamingServiceBase extends IMbmsStreamingService.Stub { } final int uid = Binder.getCallingUid(); callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); return initialize(new MbmsStreamingSessionCallback() { int result = initialize(new MbmsStreamingSessionCallback() { @Override public void onError(final int errorCode, final String message) { try { Loading Loading @@ -105,6 +99,17 @@ public class MbmsStreamingServiceBase extends IMbmsStreamingService.Stub { } } }, subscriptionId); if (result == MbmsErrors.SUCCESS) { callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); } return result; } Loading Loading @@ -161,14 +166,8 @@ public class MbmsStreamingServiceBase extends IMbmsStreamingService.Stub { } final int uid = Binder.getCallingUid(); callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); return startStreaming(subscriptionId, serviceId, new StreamingServiceCallback() { int result = startStreaming(subscriptionId, serviceId, new StreamingServiceCallback() { @Override public void onError(final int errorCode, final String message) { try { Loading Loading @@ -215,6 +214,17 @@ public class MbmsStreamingServiceBase extends IMbmsStreamingService.Stub { } } }); if (result == MbmsErrors.SUCCESS) { callback.asBinder().linkToDeath(new DeathRecipient() { @Override public void binderDied() { onAppCallbackDied(uid, subscriptionId); } }, 0); } return result; } /** Loading