- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
210 lines
6.4 KiB
Java
210 lines
6.4 KiB
Java
package com.applovin.impl.sdk.ad;
|
|
|
|
import android.net.Uri;
|
|
import androidx.core.util.Consumer;
|
|
import com.applovin.impl.adview.e;
|
|
import com.applovin.impl.ng;
|
|
import com.applovin.impl.sdk.j;
|
|
import com.applovin.impl.sdk.utils.JsonUtils;
|
|
import com.applovin.impl.sdk.utils.StringUtils;
|
|
import com.applovin.impl.tl;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.tapjoy.TJAdUnitConstants;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class a extends b {
|
|
private final String l;
|
|
private final String m;
|
|
private final String n;
|
|
private final ng o;
|
|
|
|
public a(JSONObject jSONObject, JSONObject jSONObject2, j jVar) {
|
|
super(jSONObject, jSONObject2, jVar);
|
|
this.l = j1();
|
|
this.m = o1();
|
|
this.n = n1();
|
|
this.o = new ng(this);
|
|
}
|
|
|
|
private String n1() {
|
|
return getStringFromAdObject("stream_url", "");
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.b
|
|
public boolean I0() {
|
|
return containsKeyForAdObject("stream_url");
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.b
|
|
public String P() {
|
|
return this.m;
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.b, com.applovin.impl.sdk.AppLovinAdBase, com.applovin.impl.lg
|
|
public ng getAdEventTracker() {
|
|
return this.o;
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.AppLovinAdImpl
|
|
public boolean hasVideoUrl() {
|
|
return t0() != null;
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.b
|
|
public Uri i() {
|
|
String stringFromAdObject = getStringFromAdObject(CampaignEx.JSON_KEY_CLICK_URL, "");
|
|
if (StringUtils.isValidString(stringFromAdObject)) {
|
|
return Uri.parse(stringFromAdObject);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public e.a i1() {
|
|
return a(getIntFromAdObject("expandable_style", e.a.INVISIBLE.b()));
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.b, com.applovin.impl.sdk.AppLovinAdBase, com.applovin.impl.lg
|
|
public boolean isOpenMeasurementEnabled() {
|
|
if (this.sdk.W().e()) {
|
|
return true;
|
|
}
|
|
return getBooleanFromAdObject("omsdk_enabled", Boolean.FALSE);
|
|
}
|
|
|
|
public String j1() {
|
|
return getStringFromAdObject(TJAdUnitConstants.String.HTML, "");
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.b
|
|
public Uri k0() {
|
|
String stringFromAdObject = getStringFromAdObject("video_click_url", "");
|
|
return StringUtils.isValidString(stringFromAdObject) ? Uri.parse(stringFromAdObject) : i();
|
|
}
|
|
|
|
public String k1() {
|
|
return getStringFromAdObject(com.mbridge.msdk.foundation.entity.b.JSON_KEY_HTML_URL, "");
|
|
}
|
|
|
|
public float l1() {
|
|
return getFloatFromAdObject("mraid_close_delay_graphic", 0.0f);
|
|
}
|
|
|
|
public String m1() {
|
|
return this.n;
|
|
}
|
|
|
|
public String o1() {
|
|
return getStringFromAdObject("video", "");
|
|
}
|
|
|
|
public boolean p1() {
|
|
if (this.adObject.has("close_button_expandable_hidden")) {
|
|
return getBooleanFromAdObject("close_button_expandable_hidden", Boolean.FALSE);
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public boolean r1() {
|
|
return getBooleanFromAdObject("should_cache_html_url_contents", Boolean.FALSE);
|
|
}
|
|
|
|
public boolean s1() {
|
|
return getBooleanFromAdObject("should_respect_whitelist_when_retrieving_html_from_url", Boolean.FALSE);
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.b
|
|
public Uri t0() {
|
|
String n1 = n1();
|
|
if (StringUtils.isValidString(n1)) {
|
|
return Uri.parse(n1);
|
|
}
|
|
String o1 = o1();
|
|
if (StringUtils.isValidString(o1)) {
|
|
return Uri.parse(o1);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.b
|
|
public void L0() {
|
|
tl tlVar = this.synchronizedAdObject;
|
|
if (tlVar != null) {
|
|
tlVar.a(new Consumer() { // from class: com.applovin.impl.sdk.ad.a$$ExternalSyntheticLambda0
|
|
@Override // androidx.core.util.Consumer
|
|
public final void accept(Object obj) {
|
|
a.this.w((tl) obj);
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
synchronized (this.adObjectLock) {
|
|
JsonUtils.putString(this.adObject, TJAdUnitConstants.String.HTML, this.l);
|
|
JsonUtils.putString(this.adObject, "stream_url", this.n);
|
|
}
|
|
}
|
|
|
|
public void b(String str) {
|
|
tl tlVar = this.synchronizedAdObject;
|
|
if (tlVar != null) {
|
|
tlVar.b(TJAdUnitConstants.String.HTML, str);
|
|
return;
|
|
}
|
|
synchronized (this.adObjectLock) {
|
|
JsonUtils.putString(this.adObject, TJAdUnitConstants.String.HTML, str);
|
|
}
|
|
}
|
|
|
|
public void d(Uri uri) {
|
|
tl tlVar = this.synchronizedAdObject;
|
|
if (tlVar != null) {
|
|
tlVar.b("video", uri.toString());
|
|
return;
|
|
}
|
|
synchronized (this.adObjectLock) {
|
|
JsonUtils.putString(this.adObject, "video", uri.toString());
|
|
}
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.ad.AppLovinAdImpl
|
|
public JSONObject getOriginalFullResponse() {
|
|
JSONObject deepCopy;
|
|
JSONObject jSONObject;
|
|
tl tlVar = this.synchronizedFullResponse;
|
|
if (tlVar != null) {
|
|
jSONObject = tlVar.a();
|
|
} else {
|
|
synchronized (this.fullResponseLock) {
|
|
deepCopy = JsonUtils.deepCopy(this.fullResponse);
|
|
}
|
|
jSONObject = deepCopy;
|
|
}
|
|
JSONArray jSONArray = JsonUtils.getJSONArray(jSONObject, com.mbridge.msdk.foundation.entity.b.JSON_KEY_ADS, new JSONArray());
|
|
if (jSONArray.length() > 0) {
|
|
JSONObject jSONObject2 = JsonUtils.getJSONObject(jSONArray, 0, new JSONObject());
|
|
JsonUtils.putString(jSONObject2, TJAdUnitConstants.String.HTML, this.l);
|
|
JsonUtils.putString(jSONObject2, "video", this.m);
|
|
JsonUtils.putString(jSONObject2, "stream_url", this.n);
|
|
}
|
|
return jSONObject;
|
|
}
|
|
|
|
public void q1() {
|
|
tl tlVar = this.synchronizedAdObject;
|
|
if (tlVar != null) {
|
|
tlVar.c("stream_url");
|
|
return;
|
|
}
|
|
synchronized (this.adObjectLock) {
|
|
this.adObject.remove("stream_url");
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void w(tl tlVar) {
|
|
tlVar.b(TJAdUnitConstants.String.HTML, this.l);
|
|
tlVar.b("stream_url", this.n);
|
|
}
|
|
}
|