Merge changes from topic "vts_cec_10" am: 293d67a425
am: 2a8959d969
am: 236a29ea05
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1584904 Change-Id: I6c9c8e07e0e8503951e90e1e7e6604c57b317b40
This commit is contained in:
commit
87af3e99ff
1 changed files with 15 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue