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

Commit bbfec56d authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Android (Google) Code Review
Browse files

Merge "CEC: Make TV try to allocate logical address 0 first" into lmp-mr1-dev

parents d2dd69ae d47abefc
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -222,18 +222,13 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
    }

    @Override
    @ServiceThreadOnly
    protected int getPreferredAddress() {
        assertRunOnServiceThread();
        return SystemProperties.getInt(Constants.PROPERTY_PREFERRED_ADDRESS_TV,
                Constants.ADDR_UNREGISTERED);
        return Constants.ADDR_TV;
    }

    @Override
    @ServiceThreadOnly
    protected void setPreferredAddress(int addr) {
        assertRunOnServiceThread();
        SystemProperties.set(Constants.PROPERTY_PREFERRED_ADDRESS_TV, String.valueOf(addr));
        Slog.w(TAG, "Preferred addres will not be stored for TV");
    }

    @Override
@@ -1631,7 +1626,7 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
            Slog.w(TAG, "Invalid record source." + Arrays.toString(recordSource));
            announceOneTouchRecordResult(recorderAddress,
                    ONE_TOUCH_RECORD_FAIL_TO_RECORD_DISPLAYED_SCREEN);
            return Constants.ABORT_UNABLE_TO_DETERMINE;
            return Constants.ABORT_CANNOT_PROVIDE_SOURCE;
        }

        addAndStartAction(new OneTouchRecordAction(this, recorderAddress, recordSource));
+2 −1
Original line number Diff line number Diff line
@@ -1192,7 +1192,8 @@ public final class HdmiControlService extends SystemService {
            }
            int activePath = tv.getActivePath();
            if (activePath != HdmiDeviceInfo.PATH_INVALID) {
                return new HdmiDeviceInfo(activePath, tv.getActivePortId());
                HdmiDeviceInfo info = tv.getDeviceInfoByPath(activePath);
                return (info != null) ? info : new HdmiDeviceInfo(activePath, tv.getActivePortId());
            }
            return null;
        }