tv.cec: Add a constant and fix cec module name
Bug: 32073236
Test: Checked CEC features works on fugu after applying Treble HAL
Change-Id: I70f542dff6dce7b336523788a4e203f432b1b6a7
diff --git a/tv/cec/1.0/default/HdmiCec.h b/tv/cec/1.0/default/HdmiCec.h
index 3e80cb1..49237d5 100644
--- a/tv/cec/1.0/default/HdmiCec.h
+++ b/tv/cec/1.0/default/HdmiCec.h
@@ -34,6 +34,7 @@
using ::android::hardware::tv::cec::V1_0::CecLogicalAddress;
using ::android::hardware::tv::cec::V1_0::CecMessage;
+using ::android::hardware::tv::cec::V1_0::MaxLength;
using ::android::hardware::tv::cec::V1_0::HdmiPortInfo;
using ::android::hardware::tv::cec::V1_0::IHdmiCec;
using ::android::hardware::tv::cec::V1_0::IHdmiCecCallback;
@@ -65,7 +66,8 @@
static void eventCallback(const hdmi_event_t* event, void* arg) {
if (mCallback != nullptr && event != nullptr) {
if (event->type == HDMI_EVENT_CEC_MESSAGE) {
- size_t length = std::min(event->cec.length, static_cast<size_t>(15));
+ size_t length = std::min(event->cec.length,
+ static_cast<size_t>(MaxLength::MESSAGE_BODY));
CecMessage cecMessage {
.initiator = static_cast<CecLogicalAddress>(event->cec.initiator),
.destination = static_cast<CecLogicalAddress>(event->cec.destination),