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

Commit 043029b4 authored by Hongguang Chen's avatar Hongguang Chen
Browse files

Only treat HDMI_RELATIVE_POSITION_BELOW as a switch

The connected HDMI devices may return other values, like POSITION_SAME,
they shouldn't be treated as a switch.

Bug: 304599865
Test: manual test w/ and w/o HDMI switch, hot plug
Change-Id: Ibe31b586bc7882d53ebbce5e367b2598b2ef0ecc
parent 3f2fdac5
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -940,9 +940,7 @@ public final class TvInputInfo implements Parcelable {
                isHardwareInput = true;
                hdmiConnectionRelativePosition = getRelativePosition(mContext, mHdmiDeviceInfo);
                isConnectedToHdmiSwitch = hdmiConnectionRelativePosition
                                != HdmiUtils.HDMI_RELATIVE_POSITION_DIRECTLY_BELOW
                        && hdmiConnectionRelativePosition
                                != HdmiUtils.HDMI_RELATIVE_POSITION_UNKNOWN;
                                == HdmiUtils.HDMI_RELATIVE_POSITION_BELOW;
            } else if (mTvInputHardwareInfo != null) {
                id = generateInputId(componentName, mTvInputHardwareInfo);
                type = sHardwareTypeToTvInputType.get(mTvInputHardwareInfo.getType(), TYPE_TUNER);