Merge "Fix incorrect evaluation of TvMessage count" into udc-dev am: 4fca5c4148

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23216451

Change-Id: Id45b2c5ad573e8fc9fff7cc456031d46161942f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
David Zhao
2023-05-12 21:44:32 +00:00
committed by Automerger Merge Worker

View File

@@ -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(