use of org.prebid.mobile.rendering.video.vast.Extension in project prebid-mobile-android by prebid.
the class AdResponseParserVast method getAdVerification.
public AdVerifications getAdVerification(AdResponseParserVast parserVast, int index) {
Ad ad = parserVast.mVast.getAds().get(index);
if (ad == null || ad.getInline() == null) {
return null;
}
// The Inline object itself can have an adVerifications node
if (ad.getInline().getAdVerifications() != null) {
return ad.getInline().getAdVerifications();
}
// Walk Extensions and look for adVerifications nodes
if (ad.getInline().getExtensions() == null) {
return null;
}
ArrayList<Extension> extensions = ad.getInline().getExtensions().getExtensions();
if (extensions != null) {
for (Extension extension : extensions) {
if (extension.getAdVerifications() != null) {
return extension.getAdVerifications();
}
}
}
return null;
}