CEC: Add VTS test to set option
Test: atest VtsHalTvCecV1_0TargetTest Bug: 172316717 Change-Id: I39405bce52f6f535dbdf9de4ab0e8803fb45df41
This commit is contained in:
parent
24a9d29a4e
commit
57af1d4b9a
1 changed files with 18 additions and 0 deletions
|
@ -31,6 +31,7 @@ using ::android::hardware::Return;
|
|||
using ::android::hardware::tv::cec::V1_0::CecLogicalAddress;
|
||||
using ::android::hardware::tv::cec::V1_0::CecMessage;
|
||||
using ::android::hardware::tv::cec::V1_0::IHdmiCec;
|
||||
using ::android::hardware::tv::cec::V1_0::OptionKey;
|
||||
using ::android::hardware::tv::cec::V1_0::Result;
|
||||
using ::android::hardware::tv::cec::V1_0::SendMessageResult;
|
||||
|
||||
|
@ -94,3 +95,20 @@ TEST_P(HdmiCecTest, VendorId) {
|
|||
Return<uint32_t> ret = hdmiCec->getVendorId();
|
||||
EXPECT_NE(ret, INCORRECT_VENDOR_ID);
|
||||
}
|
||||
|
||||
TEST_P(HdmiCecTest, SetOption) {
|
||||
Return<void> ret;
|
||||
ret = hdmiCec->setOption(OptionKey::WAKEUP, false);
|
||||
EXPECT_TRUE(ret.isOk());
|
||||
ret = hdmiCec->setOption(OptionKey::ENABLE_CEC, false);
|
||||
EXPECT_TRUE(ret.isOk());
|
||||
ret = hdmiCec->setOption(OptionKey::SYSTEM_CEC_CONTROL, true);
|
||||
EXPECT_TRUE(ret.isOk());
|
||||
// Restore option keys to their default values
|
||||
ret = hdmiCec->setOption(OptionKey::WAKEUP, true);
|
||||
EXPECT_TRUE(ret.isOk());
|
||||
ret = hdmiCec->setOption(OptionKey::ENABLE_CEC, true);
|
||||
EXPECT_TRUE(ret.isOk());
|
||||
ret = hdmiCec->setOption(OptionKey::SYSTEM_CEC_CONTROL, false);
|
||||
EXPECT_TRUE(ret.isOk());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue