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

Commit 2a4de61d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "cec: refine CEC enable/disable logic."

parents af7a8f48 718e41ee
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -402,6 +402,8 @@ public class HdmiControlService extends SystemService {
        if (mCecController != null) {
            if (mHdmiControlEnabled) {
                initializeCec(INITIATED_BY_BOOT_UP);
            } else {
                mCecController.setOption(OptionKey.ENABLE_CEC, false);
            }
        } else {
            Slog.i(TAG, "Device does not support HDMI-CEC.");
@@ -2384,6 +2386,7 @@ public class HdmiControlService extends SystemService {

    @ServiceThreadOnly
    private void enableHdmiControlService() {
        mCecController.setOption(OptionKey.ENABLE_CEC, true);
        mCecController.setOption(OptionKey.SYSTEM_CEC_CONTROL, true);
        mMhlController.setOption(OPTION_MHL_ENABLE, ENABLED);

@@ -2400,6 +2403,7 @@ public class HdmiControlService extends SystemService {
                    @Override
                    public void run() {
                        mCecController.setOption(OptionKey.ENABLE_CEC, false);
                        mCecController.setOption(OptionKey.SYSTEM_CEC_CONTROL, false);
                        mMhlController.setOption(OPTION_MHL_ENABLE, DISABLED);
                        clearLocalDevices();
                    }