summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/jni/tvinput/JTvInputHal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/jni/tvinput/JTvInputHal.cpp b/services/core/jni/tvinput/JTvInputHal.cpp
index c494044e8e18..a3eb3906cc65 100644
--- a/services/core/jni/tvinput/JTvInputHal.cpp
+++ b/services/core/jni/tvinput/JTvInputHal.cpp
@@ -418,7 +418,7 @@ JTvInputHal::TvInputCallback::TvInputCallback(JTvInputHal* hal) {
::ndk::ScopedAStatus JTvInputHal::TvInputCallback::notifyTvMessageEvent(
const AidlTvMessageEvent& event) {
const std::string DEVICE_ID_SUBTYPE = "device_id";
- if (sizeof(event.messages) > 0 && event.messages[0].subType == DEVICE_ID_SUBTYPE) {
+ if (event.messages.size() > 1 && event.messages[0].subType == DEVICE_ID_SUBTYPE) {
mHal->mLooper
->sendMessage(new NotifyTvMessageHandler(mHal,
TvMessageEventWrapper::createEventWrapper(