From 8b14b52d3e53b752b47d76290cb9ce8f9a615282 Mon Sep 17 00:00:00 2001 From: Nathalie Le Clair Date: Fri, 24 Feb 2023 15:47:36 +0100 Subject: [PATCH] Make CEC HAL support required for eARC support Reason is that the eARC implementation requires methods from the HDMI Connection HAL, which currently enters the framework through HdmiCecController. We may split this out in the future, but with the current implementation, eARC cannot be supported if CEC is not supported. Not that eARC can still work if the CEC setting is *disabled*. Test: make and atest Bug: 240388106 Change-Id: Ie025c60c27e9bcc227d082e19782c674c7d7ad8b --- .../core/java/com/android/server/hdmi/HdmiControlService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java index 3563938a9c3ca..c0deb3f8274b5 100644 --- a/services/core/java/com/android/server/hdmi/HdmiControlService.java +++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java @@ -700,6 +700,7 @@ public class HdmiControlService extends SystemService { } if (mCecController == null) { Slog.i(TAG, "Device does not support HDMI-CEC."); + return; } if (mMhlController == null) { mMhlController = HdmiMhlControllerStub.create(this); @@ -713,9 +714,6 @@ public class HdmiControlService extends SystemService { if (mEarcController == null) { Slog.i(TAG, "Device does not support eARC."); } - if (mCecController == null && mEarcController == null) { - return; - } mHdmiCecNetwork = new HdmiCecNetwork(this, mCecController, mMhlController); if (isCecControlEnabled()) { initializeCec(INITIATED_BY_BOOT_UP);