Loading services/core/java/com/android/server/tv/TvInputManagerService.java +16 −20 Original line number Diff line number Diff line Loading @@ -599,13 +599,6 @@ public final class TvInputManagerService extends SystemService { ComponentName component = it.next(); ServiceState serviceState = userState.serviceStateMap.get(component); if (serviceState != null && serviceState.sessionTokens.isEmpty()) { if (serviceState.callback != null) { try { serviceState.service.unregisterCallback(serviceState.callback); } catch (RemoteException e) { Slog.e(TAG, "error in unregisterCallback", e); } } unbindService(serviceState); it.remove(); } Loading Loading @@ -667,13 +660,6 @@ public final class TvInputManagerService extends SystemService { // Unregister all callbacks and unbind all services. for (ServiceState serviceState : userState.serviceStateMap.values()) { if (serviceState.service != null) { if (serviceState.callback != null) { try { serviceState.service.unregisterCallback(serviceState.callback); } catch (RemoteException e) { Slog.e(TAG, "error in unregisterCallback", e); } } unbindService(serviceState); } } Loading Loading @@ -3571,12 +3557,19 @@ public final class TvInputManagerService extends SystemService { @GuardedBy("mLock") private void unbindService(ServiceState serviceState) { if (!serviceState.bound) { if (serviceState == null || !serviceState.bound) { return; } if (DEBUG) { Slog.d(TAG, "unbindService(service=" + serviceState.component + ")"); } if (serviceState.callback != null) { try { serviceState.service.unregisterCallback(serviceState.callback); } catch (RemoteException e) { Slog.e(TAG, "error in unregisterCallback", e); } } mContext.unbindService(serviceState.connection); serviceState.bound = false; serviceState.service = null; Loading Loading @@ -3794,9 +3787,9 @@ public final class TvInputManagerService extends SystemService { if (serviceState.hardwareInputMap.containsKey(inputInfo.getId())) { return; } Slog.d("ServiceCallback", "addHardwareInput: device id " + deviceId + ", " + inputInfo.toString()); Slog.d(TAG, "ServiceCallback: addHardwareInput, deviceId: " + deviceId + ", inputInfo: " + inputInfo.toString() + " by " + mComponent + ", userId: " + mUserId); mTvInputHardwareManager.addHardwareInput(deviceId, inputInfo); addHardwareInputLocked(inputInfo, mComponent, mUserId); } Loading @@ -3815,6 +3808,9 @@ public final class TvInputManagerService extends SystemService { if (serviceState.hardwareInputMap.containsKey(inputInfo.getId())) { return; } Slog.d(TAG, "ServiceCallback: addHdmiInput, id: " + id + ", inputInfo: "+ inputInfo.toString() + " by " + mComponent + ", userId: " + mUserId); mTvInputHardwareManager.addHdmiInput(id, inputInfo); addHardwareInputLocked(inputInfo, mComponent, mUserId); if (mOnScreenInputId != null && mOnScreenSessionState != null) { Loading Loading @@ -3845,8 +3841,8 @@ public final class TvInputManagerService extends SystemService { final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { Slog.d("ServiceCallback", "removeHardwareInput " + inputId + " by " + mComponent); Slog.d(TAG, "ServiceCallback: removeHardwareInput, inputId: " + inputId + " by " + mComponent + ", userId: " + mUserId); removeHardwareInputLocked(inputId, mUserId); } } finally { Loading Loading
services/core/java/com/android/server/tv/TvInputManagerService.java +16 −20 Original line number Diff line number Diff line Loading @@ -599,13 +599,6 @@ public final class TvInputManagerService extends SystemService { ComponentName component = it.next(); ServiceState serviceState = userState.serviceStateMap.get(component); if (serviceState != null && serviceState.sessionTokens.isEmpty()) { if (serviceState.callback != null) { try { serviceState.service.unregisterCallback(serviceState.callback); } catch (RemoteException e) { Slog.e(TAG, "error in unregisterCallback", e); } } unbindService(serviceState); it.remove(); } Loading Loading @@ -667,13 +660,6 @@ public final class TvInputManagerService extends SystemService { // Unregister all callbacks and unbind all services. for (ServiceState serviceState : userState.serviceStateMap.values()) { if (serviceState.service != null) { if (serviceState.callback != null) { try { serviceState.service.unregisterCallback(serviceState.callback); } catch (RemoteException e) { Slog.e(TAG, "error in unregisterCallback", e); } } unbindService(serviceState); } } Loading Loading @@ -3571,12 +3557,19 @@ public final class TvInputManagerService extends SystemService { @GuardedBy("mLock") private void unbindService(ServiceState serviceState) { if (!serviceState.bound) { if (serviceState == null || !serviceState.bound) { return; } if (DEBUG) { Slog.d(TAG, "unbindService(service=" + serviceState.component + ")"); } if (serviceState.callback != null) { try { serviceState.service.unregisterCallback(serviceState.callback); } catch (RemoteException e) { Slog.e(TAG, "error in unregisterCallback", e); } } mContext.unbindService(serviceState.connection); serviceState.bound = false; serviceState.service = null; Loading Loading @@ -3794,9 +3787,9 @@ public final class TvInputManagerService extends SystemService { if (serviceState.hardwareInputMap.containsKey(inputInfo.getId())) { return; } Slog.d("ServiceCallback", "addHardwareInput: device id " + deviceId + ", " + inputInfo.toString()); Slog.d(TAG, "ServiceCallback: addHardwareInput, deviceId: " + deviceId + ", inputInfo: " + inputInfo.toString() + " by " + mComponent + ", userId: " + mUserId); mTvInputHardwareManager.addHardwareInput(deviceId, inputInfo); addHardwareInputLocked(inputInfo, mComponent, mUserId); } Loading @@ -3815,6 +3808,9 @@ public final class TvInputManagerService extends SystemService { if (serviceState.hardwareInputMap.containsKey(inputInfo.getId())) { return; } Slog.d(TAG, "ServiceCallback: addHdmiInput, id: " + id + ", inputInfo: "+ inputInfo.toString() + " by " + mComponent + ", userId: " + mUserId); mTvInputHardwareManager.addHdmiInput(id, inputInfo); addHardwareInputLocked(inputInfo, mComponent, mUserId); if (mOnScreenInputId != null && mOnScreenSessionState != null) { Loading Loading @@ -3845,8 +3841,8 @@ public final class TvInputManagerService extends SystemService { final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { Slog.d("ServiceCallback", "removeHardwareInput " + inputId + " by " + mComponent); Slog.d(TAG, "ServiceCallback: removeHardwareInput, inputId: " + inputId + " by " + mComponent + ", userId: " + mUserId); removeHardwareInputLocked(inputId, mUserId); } } finally { Loading