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

Commit a6d5dad9 authored by Jinsuk Kim's avatar Jinsuk Kim
Browse files

CEC: Check port id for ARC status update on hotplug

Fixes a bug that was updating ARC status on hotplug event
regardless of the port for which the event occurred.

Bug: 20520664
Change-Id: I17c4f391af4dd221215412ed9e3ff3d730bbf152
parent 02a2a1b2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -905,10 +905,14 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
    @ServiceThreadOnly
    private void updateArcFeatureStatus(int portId, boolean isConnected) {
        assertRunOnServiceThread();
        HdmiDeviceInfo avr = getAvrDeviceInfo();
        if (avr == null) {
            return;
        }
        // HEAC 2.4, HEACT 5-15
        // Should not activate ARC if +5V status is false.
        HdmiPortInfo portInfo = mService.getPortInfo(portId);
        if (portInfo.isArcSupported()) {
        if (avr.getPortId() == portId && portInfo.isArcSupported()) {
            changeArcFeatureEnabled(portId, isConnected);
        }
    }