CEC: Add VTS test to set option am: 57af1d4b9a
am: c2e83b76b8
am: 7dbed4a1ab
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1577104 Change-Id: I63afe27dd4ad7d493e7d2e0be78f1f3779c7d653
This commit is contained in:
commit
3550814954
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