Loading services/core/java/com/android/server/tv/TvInputManagerService.java +16 −9 Original line number Diff line number Diff line Loading @@ -128,6 +128,8 @@ public final class TvInputManagerService extends SystemService { private final WatchLogHandler mWatchLogHandler; private IBinder.DeathRecipient mDeathRecipient; public TvInputManagerService(Context context) { super(context); Loading Loading @@ -672,6 +674,7 @@ public final class TvInputManagerService extends SystemService { if (sessionToken == userState.mainSessionToken) { setMainLocked(sessionToken, false, callingUid, userId); } sessionState.session.asBinder().unlinkToDeath(sessionState, 0); sessionState.session.release(); } } catch (RemoteException | SessionNotFoundException e) { Loading Loading @@ -707,6 +710,7 @@ public final class TvInputManagerService extends SystemService { clientState.sessionTokens.remove(sessionToken); if (clientState.isEmpty()) { userState.clientStateMap.remove(sessionState.client.asBinder()); sessionState.client.asBinder().unlinkToDeath(clientState, 0); } } Loading Loading @@ -1000,8 +1004,7 @@ public final class TvInputManagerService extends SystemService { synchronized (mLock) { final UserState userState = getOrCreateUserStateLocked(resolvedUserId); userState.callbackSet.add(callback); try { callback.asBinder().linkToDeath(new IBinder.DeathRecipient() { mDeathRecipient = new IBinder.DeathRecipient() { @Override public void binderDied() { synchronized (mLock) { Loading @@ -1010,7 +1013,10 @@ public final class TvInputManagerService extends SystemService { } } } }, 0); }; try { callback.asBinder().linkToDeath(mDeathRecipient, 0); } catch (RemoteException e) { Slog.e(TAG, "client process has already died", e); } Loading @@ -1029,6 +1035,7 @@ public final class TvInputManagerService extends SystemService { synchronized (mLock) { UserState userState = getOrCreateUserStateLocked(resolvedUserId); userState.callbackSet.remove(callback); callback.asBinder().unlinkToDeath(mDeathRecipient, 0); } } finally { Binder.restoreCallingIdentity(identity); Loading Loading
services/core/java/com/android/server/tv/TvInputManagerService.java +16 −9 Original line number Diff line number Diff line Loading @@ -128,6 +128,8 @@ public final class TvInputManagerService extends SystemService { private final WatchLogHandler mWatchLogHandler; private IBinder.DeathRecipient mDeathRecipient; public TvInputManagerService(Context context) { super(context); Loading Loading @@ -672,6 +674,7 @@ public final class TvInputManagerService extends SystemService { if (sessionToken == userState.mainSessionToken) { setMainLocked(sessionToken, false, callingUid, userId); } sessionState.session.asBinder().unlinkToDeath(sessionState, 0); sessionState.session.release(); } } catch (RemoteException | SessionNotFoundException e) { Loading Loading @@ -707,6 +710,7 @@ public final class TvInputManagerService extends SystemService { clientState.sessionTokens.remove(sessionToken); if (clientState.isEmpty()) { userState.clientStateMap.remove(sessionState.client.asBinder()); sessionState.client.asBinder().unlinkToDeath(clientState, 0); } } Loading Loading @@ -1000,8 +1004,7 @@ public final class TvInputManagerService extends SystemService { synchronized (mLock) { final UserState userState = getOrCreateUserStateLocked(resolvedUserId); userState.callbackSet.add(callback); try { callback.asBinder().linkToDeath(new IBinder.DeathRecipient() { mDeathRecipient = new IBinder.DeathRecipient() { @Override public void binderDied() { synchronized (mLock) { Loading @@ -1010,7 +1013,10 @@ public final class TvInputManagerService extends SystemService { } } } }, 0); }; try { callback.asBinder().linkToDeath(mDeathRecipient, 0); } catch (RemoteException e) { Slog.e(TAG, "client process has already died", e); } Loading @@ -1029,6 +1035,7 @@ public final class TvInputManagerService extends SystemService { synchronized (mLock) { UserState userState = getOrCreateUserStateLocked(resolvedUserId); userState.callbackSet.remove(callback); callback.asBinder().unlinkToDeath(mDeathRecipient, 0); } } finally { Binder.restoreCallingIdentity(identity); Loading