Add metadata format check in bcradio VTS
Added metadata format check in AIDL broadcast radio HAL VTS. Bug: 318868350 Test: atest VtsHalBroadcastradioAidlTargetTest Change-Id: I47cdb178e76173941682fd8594fe9da13d661a1b
This commit is contained in:
parent
67e83a3c06
commit
2f1dd4cda8
1 changed files with 10 additions and 0 deletions
|
@ -250,6 +250,16 @@ ScopedAStatus TunerCallbackImpl::onCurrentProgramInfoChanged(const ProgramInfo&
|
|||
}
|
||||
}
|
||||
|
||||
for (const auto& metadataItem : info.metadata) {
|
||||
bool validMetadata = false;
|
||||
if (mCallbackAidlVersion == kAidlVersion1) {
|
||||
validMetadata = bcutils::isValidMetadata(metadataItem);
|
||||
} else {
|
||||
validMetadata = bcutils::isValidMetadataV2(metadataItem);
|
||||
}
|
||||
EXPECT_TRUE(validMetadata) << "Invalid metadata " << metadataItem.toString().c_str();
|
||||
}
|
||||
|
||||
{
|
||||
std::lock_guard<std::mutex> lk(mLock);
|
||||
mCurrentProgramInfo = info;
|
||||
|
|
Loading…
Reference in a new issue