Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c251757 authored by Yixiao Luo's avatar Yixiao Luo
Browse files

External TV Input Logging: skip duplicate adding for HardwareInput and HdmiInput

Bug: 279185950
Test: manual
Change-Id: Ibd2b3a255b2eaf092af3b768d803f07952afef49
parent d8f9519d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3429,6 +3429,10 @@ public final class TvInputManagerService extends SystemService {
            final long identity = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
                    ServiceState serviceState = getServiceStateLocked(mComponent, mUserId);
                    if (serviceState.hardwareInputMap.containsKey(inputInfo.getId())) {
                        return;
                    }
                    mTvInputHardwareManager.addHardwareInput(deviceId, inputInfo);
                    addHardwareInputLocked(inputInfo);
                }
@@ -3443,6 +3447,10 @@ public final class TvInputManagerService extends SystemService {
            final long identity = Binder.clearCallingIdentity();
            try {
                synchronized (mLock) {
                    ServiceState serviceState = getServiceStateLocked(mComponent, mUserId);
                    if (serviceState.hardwareInputMap.containsKey(inputInfo.getId())) {
                        return;
                    }
                    mTvInputHardwareManager.addHdmiInput(id, inputInfo);
                    addHardwareInputLocked(inputInfo);
                    if (mOnScreenInputId != null && mOnScreenSessionState != null) {