MD5 校验值:d53ec1a251294bef920c76a08ee856d9
e.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.applovin.impl.sdk.ad; import android.graphics.Point; import android.net.Uri; import android.os.Bundle; import android.view.MotionEvent; import com.applovin.impl.adview.j; import com.applovin.impl.adview.y; import com.applovin.impl.sdk.AppLovinAdBase; import com.applovin.impl.sdk.af; import com.applovin.impl.sdk.n; import com.applovin.impl.sdk.utils.AppLovinSdkExtraParameterKey; 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.sdk.utils.u; import com.applovin.impl.sdk.x; import com.applovin.mediation.MaxReward; import com.applovin.sdk.AppLovinAdType; import com.applovin.sdk.AppLovinSdkUtils; 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 e extends AppLovinAdImpl { private c aGA; private final List<Uri> aGs; private final AtomicBoolean aGt; private final AtomicBoolean aGu; private final AtomicReference<com.applovin.impl.sdk.b.c> aGv; private List<com.applovin.impl.sdk.d.a> aGw; private List<com.applovin.impl.sdk.d.a> aGx; private List<com.applovin.impl.sdk.d.a> aGy; private List<com.applovin.impl.sdk.d.a> aGz; public enum a { UNSPECIFIED, DISMISS, DO_NOT_DISMISS } public enum b { DEFAULT, ACTIVITY_PORTRAIT, ACTIVITY_LANDSCAPE } public class c { public final int aGJ; public final int aGK; public final int aGL; public final int aGM; public final int aGN; private c() { this.aGJ = AppLovinSdkUtils.dpToPx(n.getApplicationContext(), e.this.GM()); this.aGK = AppLovinSdkUtils.dpToPx(n.getApplicationContext(), e.this.GN()); this.aGL = AppLovinSdkUtils.dpToPx(n.getApplicationContext(), e.this.GO()); this.aGM = AppLovinSdkUtils.dpToPx(n.getApplicationContext(), ((Integer) ((AppLovinAdBase) e.this).sdk.a(com.applovin.impl.sdk.c.b.aMl)).intValue()); this.aGN = AppLovinSdkUtils.dpToPx(n.getApplicationContext(), ((Integer) ((AppLovinAdBase) e.this).sdk.a(com.applovin.impl.sdk.c.b.aMk)).intValue()); } } public enum d { RESIZE_ASPECT, TOP, BOTTOM, LEFT, RIGHT } public e(JSONObject jSONObject, JSONObject jSONObject2, com.applovin.impl.sdk.ad.b bVar, n nVar) { super(jSONObject, jSONObject2, bVar, nVar); this.aGs = CollectionUtils.synchronizedList(); this.aGt = new AtomicBoolean(); this.aGu = new AtomicBoolean(); this.aGv = new AtomicReference<>(); } private List<Integer> Gg() { return getIntegerListFromAdObject("multi_close_style", null); } private String Hi() { String stringFromAdObject = getStringFromAdObject("video_end_url", null); if (stringFromAdObject == null) { return null; } return stringFromAdObject.replace("{CLCODE}", getClCode()); } private j.a aO(boolean z) { if (z) { return j.a.WHITE_ON_TRANSPARENT; } return j.a.WHITE_ON_BLACK; } private String b(MotionEvent motionEvent, boolean z, boolean z2) { String stringFromAdObject = getStringFromAdObject("click_tracking_url", null); Map<String, String> c2 = c(motionEvent, z, z2); if (stringFromAdObject == null) { return null; } return StringUtils.replace(stringFromAdObject, c2); } private Map<String, String> c(MotionEvent motionEvent, boolean z, boolean z2) { float f; Point W = com.applovin.impl.sdk.utils.h.W(n.getApplicationContext()); HashMap hashMap = new HashMap(7); hashMap.put("{CLCODE}", getClCode()); float f2 = -1.0f; if (motionEvent != null) { f = motionEvent.getRawX(); } else { f = -1.0f; } hashMap.put("{CLICK_X}", String.valueOf(f)); if (motionEvent != null) { f2 = motionEvent.getRawY(); } hashMap.put("{CLICK_Y}", String.valueOf(f2)); hashMap.put("{SCREEN_WIDTH}", String.valueOf(W.x)); hashMap.put("{SCREEN_HEIGHT}", String.valueOf(W.y)); hashMap.put("{IS_VIDEO_CLICK}", String.valueOf(z)); hashMap.put("{IS_INSTALL}", String.valueOf(z2)); return hashMap; } public abstract String FB(); public boolean FD() { this.sdk.BL(); if (x.Fk()) { this.sdk.BL().i("DirectAd", "Attempting to invoke isVideoStream() from base ad class"); return false; } return false; } public Uri FG() { this.sdk.BL(); if (x.Fk()) { this.sdk.BL().i("DirectAd", "Attempting to invoke getVideoUri() from base ad class"); return null; } return null; } public Uri FI() { this.sdk.BL(); if (x.Fk()) { this.sdk.BL().i("DirectAd", "Attempting to invoke getClickDestinationUri() from base ad class"); return null; } return null; } public Uri FJ() { this.sdk.BL(); if (x.Fk()) { this.sdk.BL().i("DirectAd", "Attempting to invoke getVideoClickDestinationUri() from base ad class"); return null; } return null; } public b FZ() { b bVar = b.DEFAULT; String upperCase = getStringFromAdObject("ad_target", bVar.toString()).toUpperCase(Locale.ENGLISH); if ("ACTIVITY_PORTRAIT".equalsIgnoreCase(upperCase)) { return b.ACTIVITY_PORTRAIT; } if ("ACTIVITY_LANDSCAPE".equalsIgnoreCase(upperCase)) { return b.ACTIVITY_LANDSCAPE; } return bVar; } public abstract void Fy(); public boolean GA() { return getBooleanFromAdObject("progress_bar_enabled", Boolean.FALSE); } public int GB() { return getColorFromAdObject("progress_bar_color", -922746881); } public int GC() { int U; synchronized (this.adObjectLock) { U = u.U(this.adObject); } return U; } public int GD() { synchronized (this.adObjectLock) { int i = JsonUtils.getInt(this.adObject, "graphic_completion_percent", -1); if (i >= 0 && i <= 100) { return i; } return 90; } } public int GE() { return getColorFromAdObject("postitial_progress_bar_color", -922746881); } public long GF() { return getLongFromAdObject("postitial_progress_bar_total_ms", -1L); } public int GG() { return getIntFromAdObject("poststitial_shown_forward_delay_millis", -1); } public int GH() { return getIntFromAdObject("poststitial_dismiss_forward_delay_millis", -1); } public boolean GI() { return getBooleanFromAdObject("should_apply_mute_setting_to_poststitial", Boolean.FALSE); } public boolean GJ() { return getBooleanFromAdObject("should_forward_close_button_tapped_to_poststitial", Boolean.FALSE); } public boolean GK() { return getBooleanFromAdObject("forward_lifecycle_events_to_webview", Boolean.FALSE); } public c GL() { if (this.aGA == null) { this.aGA = new c(); } return this.aGA; } public int GM() { return getIntFromAdObject("close_button_size", ((Integer) this.sdk.a(com.applovin.impl.sdk.c.b.aMN)).intValue()); } public int GN() { return getIntFromAdObject("close_button_top_margin", ((Integer) this.sdk.a(com.applovin.impl.sdk.c.b.aMO)).intValue()); } public int GO() { return getIntFromAdObject("close_button_horizontal_margin", ((Integer) this.sdk.a(com.applovin.impl.sdk.c.b.aMM)).intValue()); } public boolean GP() { return getBooleanFromAdObject("lhs_close_button", (Boolean) this.sdk.a(com.applovin.impl.sdk.c.b.aML)); } public boolean GQ() { return getBooleanFromAdObject("lhs_skip_button", (Boolean) this.sdk.a(com.applovin.impl.sdk.c.b.aMY)); } public long GR() { long longFromAdObject = getLongFromAdObject("report_reward_duration", -1L); if (longFromAdObject < 0) { return -1L; } return TimeUnit.SECONDS.toMillis(longFromAdObject); } public int GS() { return getIntFromAdObject("report_reward_percent", -1); } public boolean GT() { return getBooleanFromAdObject("report_reward_percent_include_close_delay", Boolean.TRUE); } public AtomicBoolean GU() { return this.aGt; } public boolean GV() { return getBooleanFromAdObject("show_nia", Boolean.FALSE); } public String GW() { return getStringFromAdObject("nia_title", MaxReward.DEFAULT_LABEL); } public String GX() { return getStringFromAdObject("nia_message", MaxReward.DEFAULT_LABEL); } public String GY() { return getStringFromAdObject("nia_button_title", MaxReward.DEFAULT_LABEL); } public boolean GZ() { return getBooleanFromAdObject("avoms", Boolean.FALSE); } public long Ga() { return getLongFromAdObject("close_delay", 0L); } public long Gb() { return TimeUnit.SECONDS.toMillis(getLongFromAdObject("close_delay_max_buffering_time_seconds", 5L)); } public long Gc() { long j; List<Integer> Gd = Gd(); if (Gd != null && Gd.size() > 0) { j = Gd.get(0).intValue(); } else { j = 0; } long longFromAdObject = getLongFromAdObject("close_delay_graphic", j); if (longFromAdObject == -1 || longFromAdObject == -2) { return 0L; } return longFromAdObject; } public List<Integer> Gd() { return getIntegerListFromAdObject("multi_close_delay_graphic", null); } public j.a Ge() { int i; List<Integer> Gg = Gg(); if (Gg != null && Gg.size() > 0) { i = Gg.get(0).intValue(); } else { i = -1; } int intFromAdObject = getIntFromAdObject("close_style", i); if (intFromAdObject == -1) { return aO(hasVideoUrl()); } return gA(intFromAdObject); } public List<j.a> Gf() { List<Integer> Gg = Gg(); if (Gg != null) { ArrayList arrayList = new ArrayList(Gg.size()); Iterator<Integer> it = Gg.iterator(); while (it.hasNext()) { arrayList.add(gA(it.next().intValue())); } return arrayList; } return null; } public j.a Gh() { int intFromAdObject = getIntFromAdObject("skip_style", -1); if (intFromAdObject == -1) { return Ge(); } return gA(intFromAdObject); } public boolean Gi() { return getBooleanFromAdObject("dismiss_on_skip", Boolean.FALSE); } public boolean Gj() { return getBooleanFromAdObject("fire_postbacks_from_webview", Boolean.FALSE); } public boolean Gk() { return getBooleanFromAdObject("html_resources_cached", Boolean.FALSE); } public List<Uri> Gl() { return this.aGs; } public String Gm() { JSONObject jsonObjectFromAdObject = getJsonObjectFromAdObject("video_button_properties", null); if (jsonObjectFromAdObject == null) { return MaxReward.DEFAULT_LABEL; } return JsonUtils.getString(jsonObjectFromAdObject, "video_button_html", MaxReward.DEFAULT_LABEL); } public com.applovin.impl.adview.u Gn() { return new com.applovin.impl.adview.u(getJsonObjectFromAdObject("video_button_properties", null), this.sdk); } public boolean Go() { return getBooleanFromAdObject("video_clickable", Boolean.FALSE); } public boolean Gp() { return getBooleanFromAdObject("lock_current_orientation", Boolean.FALSE); } public boolean Gq() { return getBooleanFromAdObject("bvde", (Boolean) this.sdk.a(com.applovin.impl.sdk.c.b.aQv)); } public int Gr() { return getIntFromAdObject("countdown_length", 0); } public int Gs() { return getColorFromAdObject("countdown_color", -922746881); } public a Gt() { String stringFromAdObject = getStringFromAdObject("poststitial_dismiss_type", null); if (StringUtils.isValidString(stringFromAdObject)) { if ("dismiss".equalsIgnoreCase(stringFromAdObject)) { return a.DISMISS; } if ("no_dismiss".equalsIgnoreCase(stringFromAdObject)) { return a.DO_NOT_DISMISS; } } return a.UNSPECIFIED; } public List<String> Gu() { String stringFromAdObject = getStringFromAdObject("required_html_resources", null); if (stringFromAdObject != null) { return CollectionUtils.explode(stringFromAdObject); } return Collections.emptyList(); } public List<String> Gv() { String stringFromAdObject = getStringFromAdObject("resource_cache_prefix", null); if (stringFromAdObject != null) { return CollectionUtils.explode(stringFromAdObject); } return this.sdk.b(com.applovin.impl.sdk.c.b.aLI); } public boolean Gw() { return getBooleanFromAdObject("sruifwvc", Boolean.FALSE); } public boolean Gx() { return getBooleanFromAdObject("require_interaction_for_click", Boolean.FALSE); } public boolean Gy() { return getBooleanFromAdObject("sscomt", Boolean.FALSE); } public String Gz() { return getStringFromFullResponse("event_id", null); } public boolean Ha() { boolean z; if (AppLovinAdType.AUTO_INCENTIVIZED == getType()) { z = true; } else { z = false; } return getBooleanFromAdObject("show_rewarded_interstitial_overlay_alert", Boolean.valueOf(z)); } public String Hb() { return getStringFromAdObject("text_rewarded_inter_alert_title", "Watch a video to earn a reward!"); } public String Hc() { return getStringFromAdObject("text_rewarded_inter_alert_body", MaxReward.DEFAULT_LABEL); } public String Hd() { return getStringFromAdObject("text_rewarded_inter_alert_ok_action", "OK!"); } public List<com.applovin.impl.sdk.d.a> He() { List<com.applovin.impl.sdk.d.a> a2; List<com.applovin.impl.sdk.d.a> list = this.aGw; if (list != null) { return list; } synchronized (this.adObjectLock) { a2 = u.a("video_end_urls", this.adObject, getClCode(), Hi(), this.sdk); this.aGw = a2; } return a2; } public List<com.applovin.impl.sdk.d.a> Hf() { List<com.applovin.impl.sdk.d.a> a2; List<com.applovin.impl.sdk.d.a> list = this.aGx; if (list != null) { return list; } synchronized (this.adObjectLock) { a2 = u.a("ad_closed_urls", this.adObject, getClCode(), (String) null, this.sdk); this.aGx = a2; } return a2; } public List<com.applovin.impl.sdk.d.a> Hg() { List<com.applovin.impl.sdk.d.a> a2; List<com.applovin.impl.sdk.d.a> list = this.aGy; if (list != null) { return list; } synchronized (this.adObjectLock) { a2 = u.a("app_killed_urls", this.adObject, getClCode(), (String) null, this.sdk); this.aGy = a2; } return a2; } public List<com.applovin.impl.sdk.d.a> Hh() { List<com.applovin.impl.sdk.d.a> a2; List<com.applovin.impl.sdk.d.a> list = this.aGz; if (list != null) { return list; } synchronized (this.adObjectLock) { a2 = u.a("imp_urls", this.adObject, getClCode(), null, null, Hj(), Gj(), this.sdk); this.aGz = a2; } return a2; } public Map<String, String> Hj() { HashMap hashMap = new HashMap(); try { hashMap.putAll(JsonUtils.toStringMap(getJsonObjectFromAdObject("http_headers_for_postbacks", new JSONObject()))); } catch (JSONException e) { this.sdk.BL(); if (x.Fk()) { this.sdk.BL().c("DirectAd", "Failed to retrieve http headers forx postbacks", e); } } if (getBooleanFromAdObject("use_webview_ua_for_postbacks", Boolean.FALSE)) { hashMap.put("User-Agent", af.Fw()); } return hashMap; } public boolean Hk() { return getBooleanFromAdObject("playback_requires_user_action", Boolean.TRUE); } public String Hl() { String stringFromAdObject = getStringFromAdObject("base_url", "/"); if ("null".equalsIgnoreCase(stringFromAdObject)) { return null; } return stringFromAdObject; } public boolean Hm() { return getBooleanFromAdObject("web_contents_debugging_enabled", Boolean.valueOf("com.applovin.apps.test.playables".equals(n.getApplicationContext().getPackageName()))); } public y Hn() { JSONObject jsonObjectFromAdObject = getJsonObjectFromAdObject("web_view_settings", null); if (jsonObjectFromAdObject == null) { return null; } return new y(jsonObjectFromAdObject); } public int Ho() { int i; if (u.b(getSize())) { i = 1; } else if (((Boolean) this.sdk.a(com.applovin.impl.sdk.c.b.aQp)).booleanValue()) { i = 0; } else { i = -1; } return getIntFromAdObject("whalt", i); } public List<String> Hp() { return CollectionUtils.explode(getStringFromAdObject("wls", MaxReward.DEFAULT_LABEL)); } public List<String> Hq() { return CollectionUtils.explode(getStringFromAdObject("wlh", null)); } public Uri Hr() { String stringFromAdObject = getStringFromAdObject("play_image", null); if (!StringUtils.isValidString(stringFromAdObject)) { return null; } return Uri.parse(stringFromAdObject); } public Uri Hs() { String stringFromAdObject = getStringFromAdObject("pause_image", null); if (!StringUtils.isValidString(stringFromAdObject)) { return null; } return Uri.parse(stringFromAdObject); } public Uri Ht() { String stringFromAdObject = getStringFromAdObject("mute_image", "https://assets.applovin.com/sound_off.png"); if (StringUtils.isValidString(stringFromAdObject)) { return Uri.parse(stringFromAdObject); } return null; } public Uri Hu() { String stringFromAdObject = getStringFromAdObject("unmute_image", "https://assets.applovin.com/sound_on.png"); if (StringUtils.isValidString(stringFromAdObject)) { return Uri.parse(stringFromAdObject); } return null; } public boolean Hv() { String str = this.sdk.getSettings().getExtraParameters().get(AppLovinSdkExtraParameterKey.SHOULD_USE_EXOPLAYER); if (StringUtils.isValidString(str)) { return Boolean.parseBoolean(str); } return getBooleanFromAdObject("suep", Boolean.FALSE); } public boolean Hw() { return getBooleanFromAdObject("upiosp", Boolean.FALSE); } public boolean Hx() { return getBooleanFromAdObject("web_video", Boolean.FALSE); } public d Hy() { String stringFromAdObject = getStringFromAdObject("video_gravity", null); if ("top".equals(stringFromAdObject)) { return d.TOP; } if ("bottom".equals(stringFromAdObject)) { return d.BOTTOM; } if ("left".equals(stringFromAdObject)) { return d.LEFT; } if ("right".equals(stringFromAdObject)) { return d.RIGHT; } return d.RESIZE_ASPECT; } public List<com.applovin.impl.sdk.d.a> a(MotionEvent motionEvent, boolean z, boolean z2) { List<com.applovin.impl.sdk.d.a> a2; synchronized (this.adObjectLock) { a2 = u.a("click_tracking_urls", this.adObject, c(motionEvent, z, z2), b(motionEvent, z, z2), Hj(), Gj(), this.sdk); } return a2; } public void aN(boolean z) { try { synchronized (this.adObjectLock) { this.adObject.put("html_resources_cached", z); } } catch (Throwable unused) { } } public j.a gA(int i) { if (i == 1) { return j.a.WHITE_ON_TRANSPARENT; } if (i == 2) { return j.a.INVISIBLE; } if (i == 3) { return j.a.TRANSPARENT_SKIP; } return j.a.WHITE_ON_BLACK; } public abstract com.applovin.impl.sdk.a.b getAdEventTracker(); public String getCachePrefix() { return getStringFromAdObject("cache_prefix", null); } @Override public Bundle getDirectDownloadParameters() { return 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", MaxReward.DEFAULT_LABEL); } @Override public List<VerificationScriptResource> getOpenMeasurementVerificationScriptResources() { ArrayList arrayList = new ArrayList(); synchronized (this.adObjectLock) { JSONArray jSONArray = JsonUtils.getJSONArray(this.adObject, "omid_verification_script_resources", null); if (jSONArray != null) { 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.BL(); if (x.Fk()) { this.sdk.BL().c("DirectAd", "Failed to parse OMID verification script resource", th); } } } } } return arrayList; } public List<String> 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; } @Override public boolean isDirectDownloadEnabled() { return StringUtils.isValidString(getDirectDownloadToken()); } @Override public abstract boolean isOpenMeasurementEnabled(); public void k(Uri uri) { this.aGs.add(uri); } public void l(Uri uri) { synchronized (this.adObjectLock) { JsonUtils.putString(this.adObject, "play_image", uri.toString()); } } public void m(Uri uri) { synchronized (this.adObjectLock) { JsonUtils.putString(this.adObject, "pause_image", uri.toString()); } } public void n(Uri uri) { synchronized (this.adObjectLock) { JsonUtils.putString(this.adObject, "mute_image", uri.toString()); } } public void o(Uri uri) { synchronized (this.adObjectLock) { JsonUtils.putObject(this.adObject, "unmute_image", uri); } } public boolean shouldInjectOpenMeasurementScriptDuringCaching() { return getBooleanFromAdObject("iopmsdc", Boolean.FALSE); } public boolean ye() { return this.aGu.get(); } public void yf() { this.aGu.set(true); } public com.applovin.impl.sdk.b.c yg() { return this.aGv.getAndSet(null); } public List<String> d(MotionEvent motionEvent, boolean z, boolean z2) { List<String> stringListFromAdObject = getStringListFromAdObject("privacy_sandbox_click_attribution_urls", Collections.emptyList()); if (stringListFromAdObject.isEmpty()) { return stringListFromAdObject; } Map<String, String> c2 = c(motionEvent, z, z2); ArrayList arrayList = new ArrayList(stringListFromAdObject.size()); Iterator<String> it = stringListFromAdObject.iterator(); while (it.hasNext()) { arrayList.add(StringUtils.replace(it.next(), c2)); } return arrayList; } public List<com.applovin.impl.sdk.d.a> a(MotionEvent motionEvent, boolean z) { List<com.applovin.impl.sdk.d.a> a2; synchronized (this.adObjectLock) { a2 = u.a("video_click_tracking_urls", this.adObject, c(motionEvent, true, z), null, Hj(), Gj(), this.sdk); } return a2.isEmpty() ? a(motionEvent, true, z) : a2; } public void a(com.applovin.impl.sdk.b.c cVar) { this.aGv.set(cVar); } }