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

Commit 37f5bc28 authored by Jinsuk Kim's avatar Jinsuk Kim
Browse files

CEC: Update ARC feature flag on hotplug

ARC feature flag should have been updated whenever hotplug[on]
was detected, so that the ARC can be established upon device
discovery. This CL rectifies the bug.

Bug: 20817208
Change-Id: I5053ad3f576d0e405b6d8fc0c4e6584e66ed0a86
parent edcaf7c9
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -905,14 +905,22 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
    @ServiceThreadOnly
    private void updateArcFeatureStatus(int portId, boolean isConnected) {
        assertRunOnServiceThread();
        HdmiPortInfo portInfo = mService.getPortInfo(portId);
        if (!portInfo.isArcSupported()) {
            return;
        }
        HdmiDeviceInfo avr = getAvrDeviceInfo();
        if (avr == null) {
            if (isConnected) {
                // Update the status (since TV may not have seen AVR yet) so
                // that ARC can be initiated after discovery.
                mArcFeatureEnabled.put(portId, isConnected);
            }
            return;
        }
        // HEAC 2.4, HEACT 5-15
        // Should not activate ARC if +5V status is false.
        HdmiPortInfo portInfo = mService.getPortInfo(portId);
        if (avr.getPortId() == portId && portInfo.isArcSupported()) {
        if (avr.getPortId() == portId) {
            changeArcFeatureEnabled(portId, isConnected);
        }
    }