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

Commit 455f09d8 authored by Donghyun Cho's avatar Donghyun Cho
Browse files

CEC: Handle <Active Source> from AVR properly

To avoid timing issues, handling of <Active Source> was delayed until
corresponding tv input becomes ready. However, AVR is not considered as
a tv input, so delayed <Active Source> will not be processed. This
change makes <Active Source> from AVR handled immediately rather than
buffered.

Bug: 25630805
Change-Id: Iae8e86a84b5a9e5a2e62e457aaf93da67f145fac
parent 1fdeb5bd
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -499,13 +499,14 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
                HdmiLogger.debug("Device info %X not found; buffering the command", logicalAddress);
                mDelayedMessageBuffer.add(message);
            }
        } else if (!isInputReady(info.getId())) {
            HdmiLogger.debug("Input not ready for device: %X; buffering the command", info.getId());
            mDelayedMessageBuffer.add(message);
        } else {
        } else if (isInputReady(info.getId())
                || info.getDeviceType() == HdmiDeviceInfo.DEVICE_AUDIO_SYSTEM) {
            updateDevicePowerStatus(logicalAddress, HdmiControlManager.POWER_STATUS_ON);
            ActiveSource activeSource = ActiveSource.of(logicalAddress, physicalAddress);
            ActiveSourceHandler.create(this, null).process(activeSource, info.getDeviceType());
        } else {
            HdmiLogger.debug("Input not ready for device: %X; buffering the command", info.getId());
            mDelayedMessageBuffer.add(message);
        }
        return true;
    }