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

Commit 962d4503 authored by Yuncheol Heo's avatar Yuncheol Heo Committed by Android Git Automerger
Browse files

am 1cd85452: am 5f024c13: am 8705586c: Merge "Fix the hotplug behaviors in TV." into lmp-mr1-dev

* commit '1cd85452ca3e6cc0996f857f64c9c1dcbcc2898f':
  Fix the hotplug behaviors in TV.
parents 71f9b1c8 51f0290a
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -724,12 +724,9 @@ public final class HdmiControlService extends SystemService {
    void onHotplug(int portId, boolean connected) {
        assertRunOnServiceThread();

        if (connected && !isTvDevice()) {
            ArrayList<HdmiCecLocalDevice> localDevices = new ArrayList<>();
            for (int type : mLocalDevices) {
            if (type == HdmiDeviceInfo.DEVICE_TV) {
                // Skip the reallocation of the logical address on TV.
                continue;
            }
                HdmiCecLocalDevice localDevice = mCecController.getLocalDevice(type);
                if (localDevice == null) {
                    localDevice = HdmiCecLocalDevice.create(this, type);
@@ -738,6 +735,7 @@ public final class HdmiControlService extends SystemService {
                localDevices.add(localDevice);
            }
            allocateLogicalAddress(localDevices, INITIATED_BY_HOTPLUG);
        }

        for (HdmiCecLocalDevice device : mCecController.getLocalDeviceList()) {
            device.onHotplug(portId, connected);
@@ -1691,7 +1689,7 @@ public final class HdmiControlService extends SystemService {
    }

    boolean isTvDevice() {
        return tv() != null;
        return mLocalDevices.contains(HdmiDeviceInfo.DEVICE_TV);
    }

    private HdmiCecLocalDevicePlayback playback() {