正在查看: Jurassic World v1.83.4 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Jurassic World v1.83.4 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.impl.sdk.ad;
import android.graphics.Point;
import android.net.Uri;
import android.os.Bundle;
import android.view.MotionEvent;
import androidx.arch.core.util.Function;
import androidx.core.util.Consumer;
import com.applovin.impl.adview.e;
import com.applovin.impl.adview.m;
import com.applovin.impl.e5;
import com.applovin.impl.fh;
import com.applovin.impl.mg;
import com.applovin.impl.qq;
import com.applovin.impl.sdk.AppLovinAdBase;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sdk.utils.CollectionUtils;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.sj;
import com.applovin.impl.sr;
import com.applovin.impl.tl;
import com.applovin.impl.yp;
import com.applovin.impl.z3;
import com.applovin.sdk.AppLovinAdType;
import com.applovin.sdk.AppLovinSdkUtils;
import com.facebook.appevents.internal.ViewHierarchyConstants;
import com.google.common.net.HttpHeaders;
import com.google.firebase.sessions.settings.RemoteSettings;
import com.iab.omid.library.applovin.adsession.VerificationScriptResource;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public abstract class b extends AppLovinAdImpl {
private final List f;
private final AtomicBoolean g;
private final AtomicBoolean h;
private final AtomicReference i;
private final Bundle j;
private d k;
public enum EnumC0026b {
UNSPECIFIED,
DISMISS,
DO_NOT_DISMISS
}
public enum c {
DEFAULT,
ACTIVITY_PORTRAIT,
ACTIVITY_LANDSCAPE
}
public class d {
public final int a;
public final int b;
public final int c;
public final int d;
public final int e;
private d() {
this.a = AppLovinSdkUtils.dpToPx(j.l(), b.this.m());
this.b = AppLovinSdkUtils.dpToPx(j.l(), b.this.o());
this.c = AppLovinSdkUtils.dpToPx(j.l(), b.this.k());
this.d = AppLovinSdkUtils.dpToPx(j.l(), ((Integer) ((AppLovinAdBase) b.this).sdk.a(sj.C1)).intValue());
this.e = AppLovinSdkUtils.dpToPx(j.l(), ((Integer) ((AppLovinAdBase) b.this).sdk.a(sj.B1)).intValue());
}
}
public enum e {
RESIZE_ASPECT,
TOP,
BOTTOM,
LEFT,
RIGHT
}
public b(JSONObject jSONObject, JSONObject jSONObject2, j jVar) {
super(jSONObject, jSONObject2, jVar);
this.f = CollectionUtils.synchronizedList();
this.g = new AtomicBoolean();
this.h = new AtomicBoolean();
this.i = new AtomicReference();
this.j = new Bundle();
}
private List J() {
return getIntegerListFromAdObject("multi_close_style", null);
}
private String o0() {
String stringFromAdObject = getStringFromAdObject("video_end_url", null);
if (stringFromAdObject != null) {
return stringFromAdObject.replace("{CLCODE}", getClCode());
}
return null;
}
public List A() {
return getStringListFromAdObject("custom_tabs_warmup_urls", Collections.emptyList());
}
public boolean A0() {
return getBooleanFromAdObject("custom_tabs_enabled", Boolean.FALSE);
}
public boolean B() {
return getBooleanFromAdObject("dismiss_on_skip", Boolean.FALSE);
}
public boolean B0() {
return getBooleanFromAdObject("forward_lifecycle_events_to_webview", Boolean.FALSE);
}
public int C() {
return getIntFromAdObject("poststitial_dismiss_forward_delay_millis", -1);
}
public boolean C0() {
return getBooleanFromAdObject("gase", Boolean.FALSE);
}
public int D() {
return getIntFromAdObject("poststitial_shown_forward_delay_millis", -1);
}
public boolean D0() {
return getBooleanFromAdObject("lock_current_orientation", Boolean.FALSE);
}
public int E() {
return yp.a(getIntFromAdObject("graphic_completion_percent", -1), 90);
}
public AtomicBoolean E0() {
return this.g;
}
public List F() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List l;
l = b.this.l((tl) obj);
return l;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("imp_urls", new JSONObject()), getClCode(), null, null, Q(), R0(), this.sdk);
}
return a2;
}
public boolean F0() {
return getBooleanFromAdObject("lhs_skip_button", (Boolean) this.sdk.a(sj.r2));
}
public boolean G() {
return getBooleanFromAdObject("playback_requires_user_action", Boolean.TRUE);
}
public boolean G0() {
return getBooleanFromAdObject("video_clickable", Boolean.FALSE);
}
public String H() {
return getStringFromFullResponse("event_id", null);
}
public abstract boolean H0();
public List I() {
List J = J();
if (J == null) {
return null;
}
ArrayList arrayList = new ArrayList(J.size());
Iterator it = J.iterator();
while (it.hasNext()) {
arrayList.add(a(((Integer) it.next()).intValue()));
}
return arrayList;
}
public boolean I0() {
return getBooleanFromAdObject("web_contents_debugging_enabled", Boolean.valueOf(yp.h(j.l()) || yp.f(j.l()) || ((Boolean) this.sdk.a(sj.k6)).booleanValue()));
}
public boolean J0() {
return getBooleanFromAdObject("web_video", Boolean.FALSE);
}
public List K() {
return getIntegerListFromAdObject("multi_close_delay_graphic", null);
}
public abstract void K0();
public Uri L() {
String stringFromAdObject = getStringFromAdObject("mute_image", "https://assets.applovin.com/sound_off.png");
if (StringUtils.isValidString(stringFromAdObject)) {
return Uri.parse(stringFromAdObject);
}
return null;
}
public boolean L0() {
return getBooleanFromAdObject("should_apply_mute_setting_to_poststitial", Boolean.FALSE);
}
public String M() {
return getStringFromAdObject("nia_button_title", "");
}
public boolean M0() {
return getBooleanFromAdObject("should_apply_web_view_settings_to_web_view_button", (Boolean) this.sdk.a(sj.o6));
}
public String N() {
return getStringFromAdObject("nia_message", "");
}
public boolean N0() {
tl tlVar = this.synchronizedAdObject;
return tlVar != null ? ((Boolean) tlVar.a(new Function() {
public final Object apply(Object obj) {
Boolean t;
t = b.t((tl) obj);
return t;
}
})).booleanValue() : JsonUtils.getBoolean(getJsonObjectFromAdObject("video_button_properties", null), "should_cache_video_button_html_assets", Boolean.FALSE).booleanValue();
}
public String O() {
return getStringFromAdObject("nia_title", "");
}
public boolean O0() {
tl tlVar = this.synchronizedAdObject;
return tlVar != null ? ((Boolean) tlVar.a(new Function() {
public final Object apply(Object obj) {
Boolean u;
u = b.u((tl) obj);
return u;
}
})).booleanValue() : JsonUtils.getBoolean(getJsonObjectFromAdObject("video_button_properties", null), "should_cache_video_button_html_url_contents", Boolean.FALSE).booleanValue();
}
public abstract String P();
public boolean P0() {
return this.h.get();
}
public Map Q() {
HashMap hashMap = new HashMap();
try {
tl tlVar = this.synchronizedAdObject;
hashMap.putAll(tlVar != null ? (Map) tlVar.a(new Function() {
public final Object apply(Object obj) {
Map m;
m = b.m((tl) obj);
return m;
}
}) : JsonUtils.toStringMap(getJsonObjectFromAdObject("http_headers_for_postbacks", new JSONObject())));
} catch (JSONException e2) {
this.sdk.J();
if (n.a()) {
this.sdk.J().a("DirectAd", "Failed to retrieve http headers for postbacks", e2);
}
}
if (getBooleanFromAdObject("use_webview_ua_for_postbacks", Boolean.FALSE)) {
hashMap.put(HttpHeaders.USER_AGENT, sr.a());
}
return hashMap;
}
public boolean Q0() {
return getBooleanFromAdObject("custom_tabs_should_track_events", Boolean.FALSE);
}
public EnumC0026b R() {
String stringFromAdObject = getStringFromAdObject("poststitial_dismiss_type", null);
if (StringUtils.isValidString(stringFromAdObject)) {
if ("dismiss".equalsIgnoreCase(stringFromAdObject)) {
return EnumC0026b.DISMISS;
}
if ("no_dismiss".equalsIgnoreCase(stringFromAdObject)) {
return EnumC0026b.DO_NOT_DISMISS;
}
}
return EnumC0026b.UNSPECIFIED;
}
public boolean R0() {
return getBooleanFromAdObject("fire_postbacks_from_webview", Boolean.FALSE);
}
public int S() {
return getColorFromAdObject("postitial_progress_bar_color", -922746881);
}
public boolean S0() {
return getBooleanFromAdObject("should_forward_close_button_tapped_to_poststitial", Boolean.FALSE);
}
public long T() {
return getLongFromAdObject("postitial_progress_bar_total_ms", -1L);
}
public boolean T0() {
return getBooleanFromAdObject("fmsstwvoar", Boolean.FALSE);
}
public long U() {
long longFromAdObject = getLongFromAdObject("report_reward_duration", -1L);
if (longFromAdObject >= 0) {
return TimeUnit.SECONDS.toMillis(longFromAdObject);
}
return -1L;
}
public boolean U0() {
return getBooleanFromAdObject("avoms", Boolean.FALSE);
}
public int V() {
return getIntFromAdObject("report_reward_percent", -1);
}
public boolean V0() {
return getBooleanFromAdObject("report_reward_percent_include_close_delay", Boolean.TRUE);
}
public List W() {
String stringFromAdObject = getStringFromAdObject("required_html_resources", null);
return stringFromAdObject != null ? CollectionUtils.explode(stringFromAdObject) : Collections.emptyList();
}
public boolean W0() {
return getBooleanFromAdObject("require_interaction_for_click", Boolean.FALSE);
}
public List X() {
String stringFromAdObject = getStringFromAdObject("resource_cache_prefix", null);
return stringFromAdObject != null ? CollectionUtils.explode(stringFromAdObject) : this.sdk.c(sj.a1);
}
public boolean X0() {
return getBooleanFromAdObject("sruifwvc", Boolean.FALSE);
}
public String Y() {
return getStringFromAdObject("text_rewarded_inter_alert_body", "");
}
public boolean Y0() {
return getBooleanFromAdObject("respect_adview_fully_watched", Boolean.FALSE);
}
public String Z() {
return getStringFromAdObject("text_rewarded_inter_alert_ok_action", "OK!");
}
public boolean Z0() {
tl tlVar = this.synchronizedAdObject;
return tlVar != null ? ((Boolean) tlVar.a(new Function() {
public final Object apply(Object obj) {
Boolean v;
v = b.v((tl) obj);
return v;
}
})).booleanValue() : JsonUtils.getBoolean(getJsonObjectFromAdObject("video_button_properties", null), "should_respect_whitelist_when_retrieving_video_button_html_from_url", Boolean.FALSE).booleanValue();
}
public String a0() {
return getStringFromAdObject("text_rewarded_inter_alert_title", "Watch a video to earn a reward!");
}
public boolean a1() {
return getBooleanFromAdObject("show_nia", Boolean.FALSE);
}
public e.a b0() {
int intFromAdObject = getIntFromAdObject("skip_style", -1);
return intFromAdObject == -1 ? n() : a(intFromAdObject);
}
public boolean b1() {
return getBooleanFromAdObject("show_rewarded_interstitial_overlay_alert", Boolean.valueOf(AppLovinAdType.AUTO_INCENTIVIZED == getType()));
}
public List c0() {
return getStringListFromAdObject("substrings_for_disabled_click_logic", Collections.emptyList());
}
public boolean c1() {
return getBooleanFromAdObject("sscomt", Boolean.FALSE);
}
public c d0() {
c cVar = c.DEFAULT;
String upperCase = getStringFromAdObject("ad_target", cVar.toString()).toUpperCase(Locale.ENGLISH);
return "ACTIVITY_PORTRAIT".equalsIgnoreCase(upperCase) ? c.ACTIVITY_PORTRAIT : "ACTIVITY_LANDSCAPE".equalsIgnoreCase(upperCase) ? c.ACTIVITY_LANDSCAPE : cVar;
}
public boolean d1() {
return getBooleanFromAdObject("track_auto_redirects", Boolean.FALSE);
}
public Uri e0() {
String stringFromAdObject = getStringFromAdObject("unmute_image", "https://assets.applovin.com/sound_on.png");
if (StringUtils.isValidString(stringFromAdObject)) {
return Uri.parse(stringFromAdObject);
}
return null;
}
public boolean e1() {
String str = this.sdk.g0().getExtraParameters().get("should_use_exoplayer_if_available");
return StringUtils.isValidString(str) ? Boolean.parseBoolean(str) : getBooleanFromAdObject("suep", Boolean.FALSE);
}
public String f0() {
tl tlVar = this.synchronizedAdObject;
return tlVar != null ? (String) tlVar.a(new Function() {
public final Object apply(Object obj) {
String n;
n = b.n((tl) obj);
return n;
}
}) : JsonUtils.getString(getJsonObjectFromAdObject("video_button_properties", null), "video_button_base_url", RemoteSettings.FORWARD_SLASH_STRING);
}
public boolean f1() {
return getBooleanFromAdObject("upiosp", Boolean.FALSE);
}
public String g0() {
tl tlVar = this.synchronizedAdObject;
return tlVar != null ? (String) tlVar.a(new Function() {
public final Object apply(Object obj) {
String o;
o = b.o((tl) obj);
return o;
}
}) : JsonUtils.getString(getJsonObjectFromAdObject("video_button_properties", null), "video_button_html", "");
}
@Override
public abstract mg getAdEventTracker();
public String getCachePrefix() {
return getStringFromAdObject("cache_prefix", null);
}
@Override
public Bundle getDirectDownloadParameters() {
tl tlVar = this.synchronizedAdObject;
return tlVar != null ? (Bundle) tlVar.a(new Function() {
public final Object apply(Object obj) {
Bundle k;
k = b.k((tl) obj);
return k;
}
}) : JsonUtils.toBundle(getJsonObjectFromAdObject("ah_parameters", null));
}
@Override
public String getDirectDownloadToken() {
return getStringFromAdObject("ah_dd_token", null);
}
@Override
public String getOpenMeasurementContentUrl() {
return getStringFromAdObject("omid_content_url", null);
}
@Override
public String getOpenMeasurementCustomReferenceData() {
return getStringFromAdObject("omid_custom_ref_data", "");
}
@Override
public List getOpenMeasurementVerificationScriptResources() {
List list;
final Function function = new Function() {
public final Object apply(Object obj) {
return b.this.m152xccf9e37f((JSONArray) obj);
}
};
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
return b.lambda$getOpenMeasurementVerificationScriptResources$2(function, (tl) obj);
}
});
}
synchronized (this.adObjectLock) {
list = (List) function.apply(getJsonArrayFromAdObject("omid_verification_script_resources", null));
}
return list;
}
public List getPrivacySandboxImpressionAttributionUrls() {
List<String> stringListFromAdObject = getStringListFromAdObject("privacy_sandbox_impression_attribution_urls", Collections.emptyList());
if (stringListFromAdObject.isEmpty()) {
return stringListFromAdObject;
}
ArrayList arrayList = new ArrayList(stringListFromAdObject.size());
String clCode = getClCode();
Iterator<String> it = stringListFromAdObject.iterator();
while (it.hasNext()) {
arrayList.add(it.next().replace("{CLCODE}", clCode));
}
return arrayList;
}
public String h0() {
tl tlVar = this.synchronizedAdObject;
return tlVar != null ? (String) tlVar.a(new Function() {
public final Object apply(Object obj) {
String p;
p = b.p((tl) obj);
return p;
}
}) : JsonUtils.getString(getJsonObjectFromAdObject("video_button_properties", null), "video_button_html_url", "");
}
@Override
public boolean isDirectDownloadEnabled() {
return StringUtils.isValidString(getDirectDownloadToken());
}
@Override
public abstract boolean isOpenMeasurementEnabled();
public abstract Uri j();
public abstract Uri j0();
public long k0() {
return getLongFromAdObject("close_delay", 0L);
}
public long l0() {
return TimeUnit.SECONDS.toMillis(getLongFromAdObject("close_delay_max_buffering_time_seconds", 5L));
}
List m152xccf9e37f(JSONArray jSONArray) {
if (jSONArray == null) {
return Collections.emptyList();
}
ArrayList arrayList = new ArrayList();
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject jSONObject = JsonUtils.getJSONObject(jSONArray, i, (JSONObject) null);
try {
URL url = new URL(JsonUtils.getString(jSONObject, "url", null));
String string = JsonUtils.getString(jSONObject, "vendor_key", null);
String string2 = JsonUtils.getString(jSONObject, "parameters", null);
if (StringUtils.isValidString(string) && StringUtils.isValidString(string2)) {
arrayList.add(VerificationScriptResource.createVerificationScriptResourceWithParameters(string, url, string2));
} else {
arrayList.add(VerificationScriptResource.createVerificationScriptResourceWithoutParameters(url));
}
} catch (Throwable th) {
this.sdk.J();
if (n.a()) {
this.sdk.J().a("DirectAd", "Failed to parse OMID verification script resource", th);
}
}
}
return arrayList;
}
public int m0() {
return yp.a(getIntFromAdObject("video_completion_percent", -1));
}
public List n0() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List r;
r = b.this.r((tl) obj);
return r;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("video_end_urls", new JSONObject()), getClCode(), o0(), this.sdk);
}
return a2;
}
public e p0() {
String stringFromAdObject = getStringFromAdObject("video_gravity", null);
return ViewHierarchyConstants.DIMENSION_TOP_KEY.equals(stringFromAdObject) ? e.TOP : "bottom".equals(stringFromAdObject) ? e.BOTTOM : ViewHierarchyConstants.DIMENSION_LEFT_KEY.equals(stringFromAdObject) ? e.LEFT : "right".equals(stringFromAdObject) ? e.RIGHT : e.RESIZE_ASPECT;
}
public int q0() {
return getColorFromAdObject("progress_bar_color", -922746881);
}
public boolean r0() {
return getBooleanFromAdObject("progress_bar_enabled", Boolean.FALSE);
}
public abstract Uri s0();
public int t0() {
return getIntFromAdObject("whalt", yp.a(getSize()) ? 1 : ((Boolean) this.sdk.a(sj.Q5)).booleanValue() ? 0 : -1);
}
public m u0() {
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (m) tlVar.a(new Function() {
public final Object apply(Object obj) {
m s;
s = b.s((tl) obj);
return s;
}
});
}
JSONObject jsonObjectFromAdObject = getJsonObjectFromAdObject("web_view_settings", null);
if (jsonObjectFromAdObject != null) {
return new m(jsonObjectFromAdObject);
}
return null;
}
public List v0() {
return CollectionUtils.explode(getStringFromAdObject("wlh", null));
}
public List w() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List g;
g = b.this.g((tl) obj);
return g;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("custom_tabs_navigation_started_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
return a2;
}
public List w0() {
return CollectionUtils.explode(getStringFromAdObject("wls", ""));
}
public boolean x0() {
return getBooleanFromAdObject("bvde", (Boolean) this.sdk.a(sj.W5));
}
public List y() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List i;
i = b.this.i((tl) obj);
return i;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("custom_tabs_tab_hidden_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
return a2;
}
public boolean y0() {
return getBooleanFromAdObject("lhs_close_button", (Boolean) this.sdk.a(sj.e2));
}
public List z() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List j;
j = b.this.j((tl) obj);
return j;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("custom_tabs_tab_shown_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
return a2;
}
public boolean z0() {
return getBooleanFromAdObject("custom_tabs_client_warmup_enabled", Boolean.FALSE);
}
public static Bundle k(tl tlVar) {
return JsonUtils.toBundle(tlVar.a("ah_parameters", (JSONObject) null));
}
public int k() {
return getIntFromAdObject("close_button_horizontal_margin", ((Integer) this.sdk.a(sj.f2)).intValue());
}
static List lambda$getOpenMeasurementVerificationScriptResources$2(Function function, tl tlVar) {
return (List) function.apply(tlVar.a("omid_verification_script_resources", (JSONArray) null));
}
public static String p(tl tlVar) {
return JsonUtils.getString(tlVar.a("video_button_properties", (JSONObject) null), "video_button_html_url", "");
}
public long p() {
List K = K();
long longFromAdObject = getLongFromAdObject("close_delay_graphic", (K == null || K.size() <= 0) ? 0L : ((Integer) K.get(0)).intValue());
if (longFromAdObject == -1 || longFromAdObject == -2) {
return 0L;
}
return longFromAdObject;
}
public static Boolean u(tl tlVar) {
return JsonUtils.getBoolean(tlVar.a("video_button_properties", (JSONObject) null), "should_cache_video_button_html_url_contents", Boolean.FALSE);
}
public List u() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List e2;
e2 = b.this.e((tl) obj);
return e2;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("custom_tabs_navigation_failed_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
return a2;
}
public static Boolean v(tl tlVar) {
return JsonUtils.getBoolean(tlVar.a("video_button_properties", (JSONObject) null), "should_respect_whitelist_when_retrieving_video_button_html_from_url", Boolean.FALSE);
}
public List v() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List f;
f = b.this.f((tl) obj);
return f;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("custom_tabs_navigation_finished_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
return a2;
}
public static String o(tl tlVar) {
return JsonUtils.getString(tlVar.a("video_button_properties", (JSONObject) null), "video_button_html", "");
}
public int o() {
return getIntFromAdObject("close_button_top_margin", ((Integer) this.sdk.a(sj.h2)).intValue());
}
public static Boolean t(tl tlVar) {
return JsonUtils.getBoolean(tlVar.a("video_button_properties", (JSONObject) null), "should_cache_video_button_html_assets", Boolean.FALSE);
}
public List t() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List d2;
d2 = b.this.d((tl) obj);
return d2;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("custom_tabs_navigation_aborted_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
return a2;
}
public qq i0() {
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (qq) tlVar.a(new Function() {
public final Object apply(Object obj) {
qq q;
q = b.this.q((tl) obj);
return q;
}
});
}
return new qq(getJsonObjectFromAdObject("video_button_properties", null), this.sdk);
}
public qq q(tl tlVar) {
return new qq(tlVar.a("video_button_properties", (JSONObject) null), this.sdk);
}
public int q() {
return getColorFromAdObject("countdown_color", -922746881);
}
public List r(tl tlVar) {
return yp.a(tlVar.a("video_end_urls", new JSONObject()), getClCode(), o0(), this.sdk);
}
public int r() {
return getIntFromAdObject("countdown_length", 0);
}
public List a(tl tlVar) {
return yp.a(tlVar.a("ad_closed_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
public List b(tl tlVar) {
return yp.a(tlVar.a("app_killed_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
public void b(boolean z) {
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
tlVar.a("html_resources_cached", z);
return;
}
synchronized (this.adObjectLock) {
JsonUtils.putBoolean(this.adObject, "html_resources_cached", z);
}
}
public List b(final MotionEvent motionEvent, final boolean z, final boolean z2) {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List a3;
a3 = b.this.a(motionEvent, z, z2, (tl) obj);
return a3;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("click_tracking_urls", new JSONObject()), a(motionEvent, z, z2), c(motionEvent, z, z2), Q(), R0(), this.sdk);
}
return a2;
}
public void b(Uri uri) {
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
tlVar.b("mute_image", uri.toString());
return;
}
synchronized (this.adObjectLock) {
JsonUtils.putString(this.adObject, "mute_image", uri.toString());
}
}
public void b() {
this.h.set(true);
}
public List l(tl tlVar) {
return yp.a(tlVar.a("imp_urls", new JSONObject()), getClCode(), null, null, Q(), R0(), this.sdk);
}
public d l() {
if (this.k == null) {
this.k = new d();
}
return this.k;
}
public static Map m(tl tlVar) {
try {
return JsonUtils.toStringMap(tlVar.a("http_headers_for_postbacks", new JSONObject()));
} catch (JSONException e2) {
throw new RuntimeException(e2);
}
}
public int m() {
return getIntFromAdObject("close_button_size", ((Integer) this.sdk.a(sj.g2)).intValue());
}
public static String n(tl tlVar) {
return JsonUtils.getString(tlVar.a("video_button_properties", (JSONObject) null), "video_button_base_url", RemoteSettings.FORWARD_SLASH_STRING);
}
public e.a n() {
List J = J();
int intFromAdObject = getIntFromAdObject("close_style", (J == null || J.size() <= 0) ? -1 : ((Integer) J.get(0)).intValue());
return intFromAdObject == -1 ? a(hasVideoUrl()) : a(intFromAdObject);
}
public static m s(tl tlVar) {
JSONObject a2 = tlVar.a("web_view_settings", (JSONObject) null);
if (a2 != null) {
return new m(a2);
}
return null;
}
public Bundle s() {
Map hashMap;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
hashMap = (Map) tlVar.a(new Function() {
public final Object apply(Object obj) {
Map c2;
c2 = b.this.c((tl) obj);
return c2;
}
});
} else {
try {
hashMap = JsonUtils.toStringMap(getJsonObjectFromAdObject("custom_tabs_http_headers", new JSONObject()));
} catch (JSONException e2) {
this.sdk.J();
if (n.a()) {
this.sdk.J().a("DirectAd", "Failed to retrieve http headers for Custom Tabs", e2);
}
hashMap = new HashMap();
}
}
Bundle bundle = new Bundle();
for (Map.Entry entry : hashMap.entrySet()) {
bundle.putString((String) entry.getKey(), (String) entry.getValue());
}
if (getBooleanFromAdObject("custom_tabs_should_use_webview_ua", Boolean.FALSE)) {
bundle.putString(HttpHeaders.USER_AGENT, sr.a());
}
return bundle;
}
public e5 x() {
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (e5) tlVar.a(new Function() {
public final Object apply(Object obj) {
e5 h;
h = b.h((tl) obj);
return h;
}
});
}
JSONObject jsonObjectFromAdObject = getJsonObjectFromAdObject("custom_tabs_settings", null);
if (jsonObjectFromAdObject != null) {
return new e5(jsonObjectFromAdObject);
}
return null;
}
public static e5 h(tl tlVar) {
JSONObject a2 = tlVar.a("custom_tabs_settings", (JSONObject) null);
if (a2 != null) {
return new e5(a2);
}
return null;
}
public String h() {
String stringFromAdObject = getStringFromAdObject("base_url", RemoteSettings.FORWARD_SLASH_STRING);
if ("null".equalsIgnoreCase(stringFromAdObject)) {
return null;
}
return stringFromAdObject;
}
public Map c(tl tlVar) {
try {
return JsonUtils.toStringMap(tlVar.a("custom_tabs_http_headers", new JSONObject()));
} catch (JSONException e2) {
this.sdk.J();
if (n.a()) {
this.sdk.J().a("DirectAd", "Failed to retrieve http headers for Custom Tabs", e2);
}
return new HashMap();
}
}
public List c() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List a3;
a3 = b.this.a((tl) obj);
return a3;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("ad_closed_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
return a2;
}
private String c(MotionEvent motionEvent, boolean z, boolean z2) {
String stringFromAdObject = getStringFromAdObject("click_tracking_url", null);
Map a2 = a(motionEvent, z, z2);
if (stringFromAdObject != null) {
return StringUtils.replace(stringFromAdObject, a2);
}
return null;
}
public void c(Uri uri) {
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
tlVar.b("unmute_image", uri.toString());
return;
}
synchronized (this.adObjectLock) {
JsonUtils.putString(this.adObject, "unmute_image", uri.toString());
}
}
public List g(tl tlVar) {
return yp.a(tlVar.a("custom_tabs_navigation_started_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
public List g() {
List a2;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
return (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List b;
b = b.this.b((tl) obj);
return b;
}
});
}
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("app_killed_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
return a2;
}
public List e(tl tlVar) {
return yp.a(tlVar.a("custom_tabs_navigation_failed_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
public Bundle e() {
return this.j;
}
public List d(tl tlVar) {
return yp.a(tlVar.a("custom_tabs_navigation_aborted_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
public long d() {
return getLongFromAdObject("ad_reshow_delay_on_app_launch_ms", -1L);
}
public List d(MotionEvent motionEvent, boolean z, boolean z2) {
List<String> stringListFromAdObject = getStringListFromAdObject("privacy_sandbox_click_attribution_urls", Collections.emptyList());
if (stringListFromAdObject.isEmpty()) {
return stringListFromAdObject;
}
Map a2 = a(motionEvent, z, z2);
ArrayList arrayList = new ArrayList(stringListFromAdObject.size());
Iterator<String> it = stringListFromAdObject.iterator();
while (it.hasNext()) {
arrayList.add(StringUtils.replace(it.next(), a2));
}
return arrayList;
}
public List j(tl tlVar) {
return yp.a(tlVar.a("custom_tabs_tab_shown_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
public List i(tl tlVar) {
return yp.a(tlVar.a("custom_tabs_tab_hidden_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
public List i() {
return this.f;
}
public fh f() {
return (fh) this.i.getAndSet(null);
}
public List a(MotionEvent motionEvent, boolean z, boolean z2, tl tlVar) {
return yp.a(tlVar.a("click_tracking_urls", new JSONObject()), a(motionEvent, z, z2), c(motionEvent, z, z2), Q(), R0(), this.sdk);
}
public List a(MotionEvent motionEvent, boolean z, tl tlVar) {
return yp.a(tlVar.a("video_click_tracking_urls", new JSONObject()), a(motionEvent, true, z), null, Q(), R0(), this.sdk);
}
public List f(tl tlVar) {
return yp.a(tlVar.a("custom_tabs_navigation_finished_urls", new JSONObject()), getClCode(), (String) null, this.sdk);
}
public static void a(String str, tl tlVar) {
JsonUtils.putString(tlVar.a("video_button_properties", (JSONObject) null), "video_button_html", str);
}
public void a(fh fhVar) {
this.i.set(fhVar);
}
public void a(Uri uri) {
this.f.add(uri);
}
public void a(final String str) {
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
tlVar.a(new Consumer() {
public final void accept(Object obj) {
b.a(str, (tl) obj);
}
});
return;
}
synchronized (this.adObjectLock) {
JsonUtils.putString(getJsonObjectFromAdObject("video_button_properties", null), "video_button_html", str);
}
}
public List a(final MotionEvent motionEvent, final boolean z) {
List a2;
List list;
tl tlVar = this.synchronizedAdObject;
if (tlVar != null) {
list = (List) tlVar.a(new Function() {
public final Object apply(Object obj) {
List a3;
a3 = b.this.a(motionEvent, z, (tl) obj);
return a3;
}
});
} else {
synchronized (this.adObjectLock) {
a2 = yp.a(getJsonObjectFromAdObject("video_click_tracking_urls", new JSONObject()), a(motionEvent, true, z), null, Q(), R0(), this.sdk);
}
list = a2;
}
return list.isEmpty() ? b(motionEvent, true, z) : list;
}
private Map a(MotionEvent motionEvent, boolean z, boolean z2) {
Point b = z3.b(j.l());
HashMap hashMap = new HashMap(7);
hashMap.put("{CLCODE}", getClCode());
hashMap.put("{CLICK_X}", String.valueOf(motionEvent != null ? motionEvent.getRawX() : -1.0f));
hashMap.put("{CLICK_Y}", String.valueOf(motionEvent != null ? motionEvent.getRawY() : -1.0f));
hashMap.put("{SCREEN_WIDTH}", String.valueOf(b.x));
hashMap.put("{SCREEN_HEIGHT}", String.valueOf(b.y));
hashMap.put("{IS_VIDEO_CLICK}", String.valueOf(z));
hashMap.put("{IS_INSTALL}", String.valueOf(z2));
return hashMap;
}
private e.a a(boolean z) {
return z ? e.a.WHITE_ON_TRANSPARENT : e.a.WHITE_ON_BLACK;
}
protected e.a a(int i) {
if (i == 1) {
return e.a.WHITE_ON_TRANSPARENT;
}
if (i == 2) {
return e.a.INVISIBLE;
}
if (i == 3) {
return e.a.TRANSPARENT_SKIP;
}
return e.a.WHITE_ON_BLACK;
}
}