Loading services/core/java/com/android/server/tv/TvInputManagerService.java +29 −14 Original line number Diff line number Diff line Loading @@ -2985,23 +2985,35 @@ public final class TvInputManagerService extends SystemService { public void addHardwareInput(int deviceId, TvInputInfo inputInfo) { ensureHardwarePermission(); ensureValidInput(inputInfo); final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { mTvInputHardwareManager.addHardwareInput(deviceId, inputInfo); addHardwareInputLocked(inputInfo); } } finally { Binder.restoreCallingIdentity(identity); } } public void addHdmiInput(int id, TvInputInfo inputInfo) { ensureHardwarePermission(); ensureValidInput(inputInfo); final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { mTvInputHardwareManager.addHdmiInput(id, inputInfo); addHardwareInputLocked(inputInfo); } } finally { Binder.restoreCallingIdentity(identity); } } public void removeHardwareInput(String inputId) { ensureHardwarePermission(); final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { ServiceState serviceState = getServiceStateLocked(mComponent, mUserId); boolean removed = serviceState.hardwareInputMap.remove(inputId) != null; Loading @@ -3012,6 +3024,9 @@ public final class TvInputManagerService extends SystemService { Slog.e(TAG, "failed to remove input " + inputId); } } } finally { Binder.restoreCallingIdentity(identity); } } } Loading Loading
services/core/java/com/android/server/tv/TvInputManagerService.java +29 −14 Original line number Diff line number Diff line Loading @@ -2985,23 +2985,35 @@ public final class TvInputManagerService extends SystemService { public void addHardwareInput(int deviceId, TvInputInfo inputInfo) { ensureHardwarePermission(); ensureValidInput(inputInfo); final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { mTvInputHardwareManager.addHardwareInput(deviceId, inputInfo); addHardwareInputLocked(inputInfo); } } finally { Binder.restoreCallingIdentity(identity); } } public void addHdmiInput(int id, TvInputInfo inputInfo) { ensureHardwarePermission(); ensureValidInput(inputInfo); final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { mTvInputHardwareManager.addHdmiInput(id, inputInfo); addHardwareInputLocked(inputInfo); } } finally { Binder.restoreCallingIdentity(identity); } } public void removeHardwareInput(String inputId) { ensureHardwarePermission(); final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { ServiceState serviceState = getServiceStateLocked(mComponent, mUserId); boolean removed = serviceState.hardwareInputMap.remove(inputId) != null; Loading @@ -3012,6 +3024,9 @@ public final class TvInputManagerService extends SystemService { Slog.e(TAG, "failed to remove input " + inputId); } } } finally { Binder.restoreCallingIdentity(identity); } } } Loading