Merge changes from topic "vts_cec_10" am: 293d67a425

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

Change-Id: I30c5aa3555127a1fbbf709a0dcb54bf33664ea1a
This commit is contained in:
Michal Olech 2021-03-30 11:20:45 +00:00 committed by Automerger Merge Worker
commit 2a8959d969

View file

@ -43,6 +43,7 @@ using ::android::hardware::tv::cec::V1_0::SendMessageResult;
#define CEC_VERSION 0x05
#define INCORRECT_VENDOR_ID 0x00
#define TV_PHYSICAL_ADDRESS 0x0000
// The main test class for TV CEC HAL.
class HdmiCecTest : public ::testing::TestWithParam<std::string> {
@ -110,6 +111,20 @@ TEST_P(HdmiCecTest, ClearAddLogicalAddress) {
EXPECT_EQ(ret, Result::SUCCESS);
}
TEST_P(HdmiCecTest, PhysicalAddress) {
Result result;
uint16_t addr;
Return<void> ret = hdmiCec->getPhysicalAddress([&result, &addr](Result res, uint16_t paddr) {
result = res;
addr = paddr;
});
EXPECT_TRUE(ret.isOk());
EXPECT_EQ(result, Result::SUCCESS);
if (!hasDeviceType(CecDeviceType::TV)) {
EXPECT_NE(addr, TV_PHYSICAL_ADDRESS);
}
}
TEST_P(HdmiCecTest, SendMessage) {
CecMessage message;
message.initiator = CecLogicalAddress::PLAYBACK_1;