CEC : fix VtsHalTvCecV1_0TargetTest SendMessage test failed. am: bebdb2bef9

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2554990

Change-Id: Ib4b14e07a1bdd112a64a7c117719d6e5b18384a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
caijq 2023-04-25 04:29:05 +00:00 committed by Automerger Merge Worker
commit a5ca70ca8a

View file

@ -127,7 +127,15 @@ TEST_P(HdmiCecTest, PhysicalAddress) {
TEST_P(HdmiCecTest, SendMessage) {
CecMessage message;
message.initiator = CecLogicalAddress::PLAYBACK_1;
if (hasDeviceType(CecDeviceType::TV))
{
hdmiCec->clearLogicalAddress();
Return<Result> result = hdmiCec->addLogicalAddress(CecLogicalAddress::TV);
EXPECT_EQ(result, Result::SUCCESS);
message.initiator = CecLogicalAddress::TV;
}
else
message.initiator = CecLogicalAddress::PLAYBACK_1;
message.destination = CecLogicalAddress::BROADCAST;
message.body.resize(1);
message.body[0] = 131;