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

Commit e73d2061 authored by Aravind Angadi's avatar Aravind Angadi Committed by Yan Han
Browse files

CEC: Update port info on hotplug events.

Update HdmiControlService#mPortInfo when hotplug events occur.

Bug: 159806029
Test: manual
Test: atest CtsHdmiCecHostTestCases
Change-Id: I590f7579dfb17d1b6ac0151829e5696966e93700
parent b32f11ca
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1239,13 +1239,11 @@ public class HdmiControlService extends SystemService {
    @ServiceThreadOnly
    void onHotplug(int portId, boolean connected) {
        assertRunOnServiceThread();
        // initPortInfo at hotplug event.
        mHdmiCecNetwork.initPortInfo();

        if (connected && !isTvDevice()
                && getPortInfo(portId).getType() == HdmiPortInfo.PORT_OUTPUT) {
            if (isSwitchDevice()) {
                mHdmiCecNetwork.initPortInfo();
                HdmiLogger.debug("initPortInfo for switch device when onHotplug from tx.");
            }
            ArrayList<HdmiCecLocalDevice> localDevices = new ArrayList<>();
            for (int type : mLocalDevices) {
                HdmiCecLocalDevice localDevice = mHdmiCecNetwork.getLocalDevice(type);