Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 x.java 源代码,内容仅作参考
package com.bytedance.sdk.openadsdk.core;
import android.app.Activity;
import android.content.Context;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
import android.util.SparseArray;
import android.view.View;
import android.webkit.JavascriptInterface;
import android.webkit.WebView;
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import com.bytedance.JProtect;
import com.bytedance.sdk.component.utils.y;
import com.bytedance.sdk.component.widget.SSWebView;
import com.bytedance.sdk.openadsdk.activity.TTWebsiteActivity;
import com.bytedance.sdk.openadsdk.core.c0.c;
import com.bytedance.sdk.openadsdk.core.f0.m;
import com.bytedance.sdk.openadsdk.utils.DeviceUtils;
import com.bytedance.sdk.openadsdk.utils.b0;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.inmobi.commons.core.configs.TelemetryConfig;
import com.mbridge.msdk.foundation.download.database.DownloadModel;
import com.mbridge.msdk.mbbid.common.BidResponsedEx;
import com.tradplus.ads.base.util.AppKeyManager;
import com.tradplus.ads.common.serialization.parser.JSONLexer;
import java.lang.ref.WeakReference;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import kotlin.text.Typography;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class x implements y.a, com.bytedance.sdk.openadsdk.i.b, df {
private static final Map<String, Boolean> N;
protected Map<String, Object> A;
private com.bytedance.sdk.openadsdk.d.o D;
private d8z313Y E;
private String F;
private com.bytedance.sdk.openadsdk.core.widget.webview.a H;
private com.bytedance.sdk.openadsdk.k.f I;
private boolean f2057J;
private boolean K;
private Context L;
private j M;
private WeakReference<SSWebView> a;
private String c;
private com.bytedance.sdk.openadsdk.core.widget.b d;
private com.bytedance.sdk.openadsdk.i.c e;
private WeakReference<View> f;
private String g;
private int h;
private int i;
private com.bytedance.sdk.openadsdk.core.f0.q k;
private j3TX451 l;
private com.bytedance.sdk.openadsdk.core.nativeexpress.l m;
private JSONObject n;
private com.bytedance.sdk.openadsdk.i.d o;
private com.bytedance.sdk.openadsdk.k.a p;
private com.bytedance.sdk.openadsdk.k.e q;
private com.bytedance.sdk.openadsdk.k.d r;
private JSONObject s;
private com.bytedance.sdk.openadsdk.core.c0.d t;
private com.bytedance.sdk.openadsdk.k.b u;
private com.bytedance.sdk.openadsdk.k.i v;
private List<com.bytedance.sdk.openadsdk.core.f0.q> x;
private HashMap<String, com.bytedance.sdk.openadsdk.core.i> y;
private boolean j = true;
private boolean w = true;
private boolean z = false;
private boolean B = false;
boolean C = false;
private boolean G = false;
private com.bytedance.sdk.component.utils.y f2058b = new com.bytedance.sdk.component.utils.y(Looper.getMainLooper(), this);
public class a implements O7 {
a(x xVar) {
}
@Override
@NonNull
public <T> T a(@NonNull String str, @NonNull Type type) {
return null;
}
@Override
@NonNull
public <T> String a(@NonNull T t) {
return null;
}
}
class b implements Runnable {
final JSONObject a;
b(JSONObject jSONObject) {
this.a = jSONObject;
}
@Override
public void run() {
x.this.k(this.a);
}
}
class c implements Runnable {
final JSONObject a;
c(JSONObject jSONObject) {
this.a = jSONObject;
}
@Override
public void run() {
x.this.e(this.a);
}
}
class d implements Runnable {
final JSONObject a;
d(JSONObject jSONObject) {
this.a = jSONObject;
}
@Override
public void run() {
x.this.f(this.a);
}
}
class e implements Runnable {
e() {
}
@Override
public void run() {
x.this.k();
}
}
class f implements Runnable {
f() {
}
@Override
public void run() {
if (x.this.H != null) {
x.this.H.initRenderFinish();
}
}
}
public class g implements com.bytedance.sdk.openadsdk.k.c {
g(x xVar, JSONObject jSONObject, k kVar) {
}
}
public class h implements com.bytedance.sdk.openadsdk.k.c {
h(x xVar) {
}
}
public class i extends s5 {
final Uri c;
i(String str, Uri uri) {
super(str);
this.c = uri;
}
@Override
public void run() {
long j;
String str;
JSONObject jSONObject;
String queryParameter = this.c.getQueryParameter("category");
String queryParameter2 = this.c.getQueryParameter("tag");
x.this.F = queryParameter2;
String queryParameter3 = this.c.getQueryParameter("label");
if (x.this.e(queryParameter3)) {
long j2 = 0;
try {
j = Long.parseLong(this.c.getQueryParameter(AppMeasurementSdk.ConditionalUserProperty.VALUE));
} catch (Exception unused) {
j = 0;
}
try {
j2 = Long.parseLong(this.c.getQueryParameter("ext_value"));
} catch (Exception unused2) {
}
long j3 = j2;
JSONObject jSONObject2 = null;
String queryParameter4 = this.c.getQueryParameter("extra");
if (!TextUtils.isEmpty(queryParameter4)) {
try {
JSONObject jSONObject3 = new JSONObject(queryParameter4);
try {
jSONObject3.putOpt("ua_policy", Integer.valueOf(x.this.i));
} catch (Exception unused3) {
}
jSONObject2 = jSONObject3;
} catch (Exception unused4) {
}
}
if ("click".equals(queryParameter3)) {
jSONObject2 = x.this.c(jSONObject2);
}
if (!"landing_perf_error".equals(queryParameter3) && !"landing_perf_stats".equals(queryParameter3)) {
str = x.this.d(queryParameter2);
jSONObject = jSONObject2;
} else {
try {
JSONObject jSONObject4 = new JSONObject();
for (String str2 : this.c.getQueryParameterNames()) {
try {
if ("extra".equals(str2)) {
jSONObject4.put("ad_extra_data", new JSONObject(this.c.getQueryParameter(str2)).optString("ad_extra_data"));
} else {
jSONObject4.put(str2, this.c.getQueryParameter(str2));
}
} catch (Exception unused5) {
}
}
str = x.this.c;
jSONObject = jSONObject4;
} catch (Exception unused6) {
return;
}
}
com.bytedance.sdk.openadsdk.d.c.a(x.this.k, queryParameter, str, queryParameter3, j, j3, jSONObject);
}
}
}
public interface j {
void a();
}
public static class k {
public String a;
public String f2062b;
public String c;
public JSONObject d;
public int e;
}
static {
ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();
N = concurrentHashMap;
Boolean bool = Boolean.TRUE;
concurrentHashMap.put("log_event", bool);
concurrentHashMap.put("private", bool);
concurrentHashMap.put("dispatch_message", bool);
concurrentHashMap.put("custom_event", bool);
concurrentHashMap.put("log_event_v3", bool);
}
public x(Context context) {
this.L = context;
}
private WebView f() {
WeakReference<SSWebView> weakReference = this.a;
if (weakReference == null || weakReference.get() == null) {
return null;
}
return this.a.get().getWebView();
}
private void h(JSONObject jSONObject) {
com.bytedance.sdk.openadsdk.k.b bVar = this.u;
if (bVar == null || jSONObject == null) {
return;
}
bVar.a(jSONObject.optBoolean("isRenderSuc", false), jSONObject.optInt("code", -1), jSONObject.optString(NotificationCompat.CATEGORY_MESSAGE, ""));
}
public void k() {
com.bytedance.sdk.openadsdk.core.nativeexpress.l lVar = this.m;
if (lVar != null) {
lVar.j();
}
}
@JProtect
private void l(JSONObject jSONObject) {
int i2;
double d2;
double d3;
JSONObject optJSONObject;
boolean z;
double d4;
com.bytedance.sdk.openadsdk.k.f fVar;
x xVar = this;
if (xVar.l == null || jSONObject == null) {
return;
}
pYz69D66 pyz69d66 = new pYz69D66();
pyz69d66.g7L28(1);
try {
boolean optBoolean = jSONObject.optBoolean("isRenderSuc");
JSONObject optJSONObject2 = jSONObject.optJSONObject("AdSize");
d2 = TelemetryConfig.DEFAULT_SAMPLING_FACTOR;
if (optJSONObject2 != null) {
d2 = optJSONObject2.optDouble("width");
d3 = optJSONObject2.optDouble("height");
} else {
d3 = 0.0d;
}
optJSONObject = jSONObject.optJSONObject("videoInfo");
if (optJSONObject != null) {
try {
double optDouble = optJSONObject.optDouble("x");
double optDouble2 = optJSONObject.optDouble("y");
z = optBoolean;
double optDouble3 = optJSONObject.optDouble("width");
double optDouble4 = optJSONObject.optDouble("height");
if (xVar.a(optJSONObject)) {
d4 = d3;
pyz69d66.Z5AQ7((float) optJSONObject.optDouble("borderRadiusTopLeft"));
pyz69d66.pcM9xx3f((float) optJSONObject.optDouble("borderRadiusTopRight"));
pyz69d66.g8((float) optJSONObject.optDouble("borderRadiusBottomLeft"));
pyz69d66.z29n97((float) optJSONObject.optDouble("borderRadiusBottomRight"));
} else {
d4 = d3;
}
pyz69d66.gqs2(optDouble);
pyz69d66.ACE(optDouble2);
pyz69d66.Ogh(optDouble3);
pyz69d66.Ozp48(optDouble4);
} catch (Exception unused) {
i2 = 101;
xVar = this;
pyz69d66.Bcny5qC1(i2);
pyz69d66.VJ(com.bytedance.sdk.openadsdk.core.g.a(i2));
xVar.l.a(pyz69d66);
}
} else {
z = optBoolean;
d4 = d3;
}
} catch (Exception unused2) {
}
try {
String optString = jSONObject.optString("message", com.bytedance.sdk.openadsdk.core.g.a(101));
int optInt = jSONObject.optInt("code", 101);
try {
pyz69d66.MN0(z);
pyz69d66.h7uEG5(d2);
pyz69d66.jB(d4);
pyz69d66.VJ(optString);
pyz69d66.Bcny5qC1(optInt);
xVar = this;
xVar.l.a(pyz69d66);
if (optJSONObject == null || (fVar = xVar.I) == null) {
return;
}
fVar.a(pyz69d66);
} catch (Exception unused3) {
xVar = this;
i2 = 101;
pyz69d66.Bcny5qC1(i2);
pyz69d66.VJ(com.bytedance.sdk.openadsdk.core.g.a(i2));
xVar.l.a(pyz69d66);
}
} catch (Exception unused4) {
xVar = this;
i2 = 101;
pyz69d66.Bcny5qC1(i2);
pyz69d66.VJ(com.bytedance.sdk.openadsdk.core.g.a(i2));
xVar.l.a(pyz69d66);
}
}
private void m(JSONObject jSONObject) {
if (jSONObject == null || this.o == null) {
return;
}
try {
JSONArray optJSONArray = jSONObject.optJSONArray("temaiProductIds");
if (optJSONArray != null && optJSONArray.length() > 0) {
this.o.a(true, optJSONArray);
} else {
this.o.a(false, null);
}
} catch (Exception unused) {
this.o.a(false, null);
}
}
private void o(JSONObject jSONObject) {
if (jSONObject == null) {
return;
}
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", "TTAndroidObject handlerDynamicTrack");
try {
Uri parse = Uri.parse(jSONObject.optString("trackData"));
if ("bytedance".equals(parse.getScheme().toLowerCase())) {
com.bytedance.sdk.openadsdk.utils.k.a(parse, this);
}
} catch (Exception unused) {
}
}
private void q(JSONObject jSONObject) {
WebView f2;
if (jSONObject == null || (f2 = f()) == null) {
return;
}
String str = "javascript:ToutiaoJSBridge._handleMessageFromToutiao(" + jSONObject + ")";
com.bytedance.sdk.component.utils.l.a(f2, str);
if (com.bytedance.sdk.component.utils.m.b()) {
com.bytedance.sdk.component.utils.m.e("TTAD.AndroidObject", "js_msg " + str);
}
}
private void t() {
if (this.e == null) {
this.e = com.bytedance.sdk.openadsdk.i.a.a(this, this.k);
}
}
private boolean v() {
com.bytedance.sdk.openadsdk.core.f0.q qVar = this.k;
if (qVar == null || qVar.D0() == null || com.bytedance.sdk.openadsdk.core.f0.t.i(this.k) || this.z || this.k.D0().optInt("parent_type") != 2) {
return false;
}
int R = this.k.R();
if (R == 8 || R == 7) {
this.z = true;
return true;
}
return false;
}
private void x() {
if (this.L == null || TextUtils.isEmpty(o.d().W())) {
return;
}
TTWebsiteActivity.a(this.L, this.k, this.F);
}
public x a(boolean z) {
return this;
}
@Override
public void a(String str) {
}
@JProtect
public void a(JSONObject jSONObject, com.bytedance.sdk.openadsdk.k.c cVar) {
}
@Override
@JavascriptInterface
public String adInfo() {
JSONObject jSONObject = new JSONObject();
try {
b(jSONObject);
} catch (Exception unused) {
}
return jSONObject.toString();
}
@Override
@JavascriptInterface
public String appInfo() {
JSONObject jSONObject = new JSONObject();
try {
a(jSONObject, 0);
} catch (Exception unused) {
}
return jSONObject.toString();
}
@Override
public void b(String str) {
}
@Override
@JavascriptInterface
public void changeVideoState(String str) {
try {
com.bytedance.sdk.openadsdk.utils.y.a(new c(new JSONObject(str)));
} catch (Exception unused) {
}
}
@Override
@JavascriptInterface
public void chooseAdResult(String str) {
try {
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt("video_choose");
long optLong = jSONObject.optLong("video_choose_duration");
com.bytedance.sdk.openadsdk.k.f fVar = this.I;
if (fVar != null) {
fVar.a(optInt, optLong);
}
} catch (Exception unused) {
}
}
@Override
@JavascriptInterface
public void clickEvent(String str) {
try {
com.bytedance.sdk.openadsdk.utils.y.a(new d(new JSONObject(str)));
} catch (Exception unused) {
}
}
@Override
@JavascriptInterface
public void dynamicTrack(String str) {
try {
o(new JSONObject(str));
} catch (Exception unused) {
}
}
public x g(String str) {
return this;
}
public void g() {
com.bytedance.sdk.openadsdk.k.b bVar;
if (this.K && (bVar = this.u) != null) {
bVar.a();
return;
}
Context context = this.L;
if ((context instanceof Activity) && com.bytedance.sdk.openadsdk.utils.o.a((Activity) context)) {
((Activity) this.L).finish();
}
}
@Override
@JavascriptInterface
public String getCurrentVideoState() {
JSONObject jSONObject = new JSONObject();
i(jSONObject);
return jSONObject.toString();
}
@Override
@JavascriptInterface
public String getTemplateInfo() {
a("getTemplateInfo", true);
try {
JSONObject jSONObject = this.n;
if (jSONObject != null) {
jSONObject.put("setting", e());
com.bytedance.sdk.openadsdk.core.f0.q qVar = this.k;
if (qVar != null) {
this.n.put("extension", qVar.P());
}
}
a("getTemplateInfo", false);
return this.n.toString();
} catch (Exception unused) {
return "";
}
}
public x h(String str) {
return this;
}
public x i(String str) {
this.c = str;
return this;
}
@Override
@JavascriptInterface
public void initRenderFinish() {
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", "initRenderFinish");
com.bytedance.sdk.openadsdk.utils.y.a(new f());
}
public x j(String str) {
this.g = str;
return this;
}
@Override
@JavascriptInterface
public void muteVideo(String str) {
try {
com.bytedance.sdk.openadsdk.utils.y.a(new b(new JSONObject(str)));
} catch (Exception unused) {
com.bytedance.sdk.component.utils.m.b("TTAD.AndroidObject", "");
}
}
public boolean n() {
com.bytedance.sdk.openadsdk.core.f0.q qVar = this.k;
return qVar != null && qVar.e1();
}
public void p(JSONObject jSONObject) {
int optInt = jSONObject.optInt("landingStyle");
String optString = jSONObject.optString("url");
String optString2 = jSONObject.optString("fallback_url");
boolean z = this.L instanceof Activity;
try {
jSONObject.put("is_activity", z);
} catch (JSONException unused) {
}
boolean z2 = true;
com.bytedance.sdk.openadsdk.d.c.b(this.k, this.F, 1, jSONObject);
if (TextUtils.isEmpty(optString)) {
return;
}
if (optInt == 0) {
WebView f2 = f();
if (f2 != null) {
f2.loadUrl(optString);
com.bytedance.sdk.openadsdk.d.c.b(this.k, this.F, 2, (JSONObject) null);
} else {
com.bytedance.sdk.openadsdk.d.c.b(this.k, this.F, -1, (JSONObject) null);
}
} else if (optInt == 1) {
if (z) {
com.bytedance.sdk.openadsdk.utils.o.b((Activity) this.L, optString, this.k, this.F);
}
} else if (optInt == 2) {
if (z && !com.bytedance.sdk.openadsdk.utils.o.a((Activity) this.L, optString, this.k, this.F)) {
com.bytedance.sdk.openadsdk.utils.o.b((Activity) this.L, optString2, this.k, this.F);
}
} else if (optInt != 3) {
z2 = false;
} else if (z) {
if (z.a(this.L, optString, this.k, this.h, this.F, false)) {
com.bytedance.sdk.openadsdk.d.c.b(this.k, this.F, 3, (JSONObject) null);
} else {
com.bytedance.sdk.openadsdk.d.c.b(this.k, this.F, -2, (JSONObject) null);
}
}
com.bytedance.sdk.openadsdk.core.widget.b bVar = this.d;
if (bVar == null || !z2) {
return;
}
bVar.a();
}
public x r(JSONObject jSONObject) {
this.n = jSONObject;
return this;
}
@Override
@JavascriptInterface
public void renderDidFinish(String str) {
try {
l(new JSONObject(str));
} catch (Exception unused) {
}
}
@JProtect
public void s() {
a((JSONObject) null, new h(this));
}
@Override
@JavascriptInterface
public void skipVideo() {
com.bytedance.sdk.openadsdk.utils.y.a(new e());
}
public void u() {
d8z313Y d8z313y = this.E;
if (d8z313y == null) {
return;
}
d8z313y.O2WW392N();
this.E = null;
}
public boolean w() {
return this.C;
}
private List<String> d() {
return Arrays.asList("appInfo", "adInfo", "getTemplateInfo", "getTeMaiAds");
}
public void e(JSONObject jSONObject) {
if (this.m != null && jSONObject != null) {
try {
this.m.a(jSONObject.optInt("stateType", -1));
} catch (Exception unused) {
}
}
}
private void i() {
com.bytedance.sdk.openadsdk.k.i iVar = this.v;
if (iVar == null) {
return;
}
iVar.a();
}
private void j() {
com.bytedance.sdk.openadsdk.k.i iVar = this.v;
if (iVar == null) {
return;
}
iVar.b();
}
private void n(JSONObject jSONObject) {
com.bytedance.sdk.openadsdk.d.o oVar;
if (jSONObject == null || (oVar = this.D) == null) {
return;
}
oVar.a(jSONObject);
}
public void r() {
j jVar = this.M;
if (jVar != null) {
jVar.a();
}
}
private void d(JSONObject jSONObject) throws Exception {
if (TextUtils.isEmpty(com.bytedance.sdk.openadsdk.core.f0.t.d(this.k))) {
return;
}
jSONObject.put("playable_style", com.bytedance.sdk.openadsdk.core.f0.t.d(this.k));
}
public void f(JSONObject jSONObject) {
String str;
double d2;
double d3;
double d4;
double d5;
double d6;
double d7;
double d8;
double d9;
double d10;
JSONObject jSONObject2;
if (jSONObject == null) {
return;
}
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", "TTAndroidObject handleClickEvent");
try {
String optString = jSONObject.optString("adId");
int optInt = jSONObject.optInt("areaType", 1);
String optString2 = jSONObject.optString("clickAreaType");
JSONObject optJSONObject = jSONObject.optJSONObject("clickInfo");
double d11 = TelemetryConfig.DEFAULT_SAMPLING_FACTOR;
if (optJSONObject != null) {
double optDouble = optJSONObject.optDouble("down_x", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
d4 = optJSONObject.optDouble("down_y", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
double optDouble2 = optJSONObject.optDouble("up_x", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
double optDouble3 = optJSONObject.optDouble("up_y", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
double optDouble4 = optJSONObject.optDouble("down_time", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
double optDouble5 = optJSONObject.optDouble("up_time", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
double optDouble6 = optJSONObject.optDouble("button_x", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
double optDouble7 = optJSONObject.optDouble("button_y", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
double optDouble8 = optJSONObject.optDouble("button_width", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
double optDouble9 = optJSONObject.optDouble("button_height", TelemetryConfig.DEFAULT_SAMPLING_FACTOR);
jSONObject2 = optJSONObject.optJSONObject("rectInfo");
d10 = optDouble9;
d11 = optDouble;
d3 = optDouble2;
d5 = optDouble4;
d6 = optDouble5;
d7 = optDouble6;
d8 = optDouble7;
d9 = optDouble8;
str = optString;
d2 = optDouble3;
} else {
str = optString;
d2 = 0.0d;
d3 = 0.0d;
d4 = 0.0d;
d5 = 0.0d;
d6 = 0.0d;
d7 = 0.0d;
d8 = 0.0d;
d9 = 0.0d;
d10 = 0.0d;
jSONObject2 = null;
}
com.bytedance.sdk.openadsdk.core.f0.m a2 = new m.b().a((float) d11).b((float) d4).c((float) d3).d((float) d2).a((long) d5).b((long) d6).d((int) d7).e((int) d8).c((int) d9).b((int) d10).a(optString2).a((SparseArray<c.a>) null).a(true).a(optInt).a(jSONObject2).f(jSONObject.optInt("clickAreaCategory", -1)).a();
j3TX451 j3tx451 = this.l;
if (j3tx451 != null) {
j3tx451.a(null, optInt, a2);
}
a(str, optInt, a2);
} catch (Exception unused) {
j3TX451 j3tx4512 = this.l;
if (j3tx4512 != null) {
j3tx4512.a(null, -1, null);
}
}
}
public void h() {
com.bytedance.sdk.openadsdk.core.nativeexpress.l lVar = this.m;
if (lVar != null) {
lVar.f();
}
}
public void k(String str) {
this.F = str;
}
private boolean i(JSONObject jSONObject) {
com.bytedance.sdk.openadsdk.core.nativeexpress.l lVar = this.m;
if (lVar != null && jSONObject != null) {
int i2 = this.m.i();
try {
jSONObject.put("currentTime", lVar.k() / 1000.0d);
jSONObject.put("state", i2);
return true;
} catch (Exception unused) {
}
}
return false;
}
private boolean j(JSONObject jSONObject) {
try {
jSONObject.put("creatives", a(this.x));
} catch (Exception unused) {
}
return true;
}
public void k(JSONObject jSONObject) {
if (this.m != null && jSONObject != null) {
try {
this.m.a(jSONObject.optBoolean("mute", false));
} catch (Exception unused) {
}
}
}
public x a(com.bytedance.sdk.openadsdk.core.widget.b bVar) {
this.d = bVar;
return this;
}
public x b(SSWebView sSWebView) {
com.bytedance.sdk.component.utils.m.b("webviewpool", "===useJsb2 webView hashCode:" + sSWebView.hashCode());
if (sSWebView.getWebView() == null) {
return this;
}
try {
d8z313Y AhRu0ksV = d8z313Y.gt65QHUX(sSWebView.getWebView()).gt65QHUX(new com.bytedance.sdk.openadsdk.j.a()).g8("ToutiaoJSBridge").jB(new a(this)).Bcny5qC1(com.bytedance.sdk.openadsdk.core.h.a().p()).VJ(true).EAU().AhRu0ksV();
this.E = AhRu0ksV;
com.bytedance.sdk.openadsdk.j.b.e.a(AhRu0ksV, this);
com.bytedance.sdk.openadsdk.j.b.a.a(this.E, this);
com.bytedance.sdk.openadsdk.j.b.b.a(this.E, this);
com.bytedance.sdk.openadsdk.j.b.c.a(this.E, this);
com.bytedance.sdk.openadsdk.j.b.d.a(this.E, this);
com.bytedance.sdk.openadsdk.j.b.f.a(this.E, this);
com.bytedance.sdk.openadsdk.j.b.g.a(this.E, this);
} catch (Exception unused) {
}
return this;
}
public x c(int i2) {
this.i = i2;
return this;
}
@JProtect
private JSONObject e() {
int S;
int R;
int a2;
int r;
boolean c2;
boolean z;
boolean z2;
boolean z3;
com.bytedance.sdk.openadsdk.core.f0.q qVar;
JSONObject jSONObject = new JSONObject();
if (o.d() == null) {
return jSONObject;
}
try {
com.bytedance.sdk.openadsdk.core.f0.q qVar2 = this.k;
S = qVar2 != null ? qVar2.S() : 0;
com.bytedance.sdk.openadsdk.core.f0.q qVar3 = this.k;
R = qVar3 != null ? qVar3.R() : 0;
a2 = o.d().a(String.valueOf(S));
r = o.d().r(String.valueOf(S));
c2 = o.d().c(String.valueOf(S));
z = true;
z2 = !com.bytedance.sdk.openadsdk.core.f0.q.c(this.k) && o.d().j(String.valueOf(S)) == 1;
} catch (Exception unused) {
}
if (R != 7 && R != 8) {
z3 = o.d().f(String.valueOf(S));
jSONObject.put("voice_control", z3);
jSONObject.put("rv_skip_time", a2);
jSONObject.put("fv_skip_show", c2);
jSONObject.put("iv_skip_time", r);
qVar = this.k;
if (qVar != null || !qVar.g1()) {
z = false;
}
jSONObject.put("show_dislike", z);
com.bytedance.sdk.openadsdk.core.f0.q qVar4 = this.k;
jSONObject.put("video_adaptation", qVar4 != null ? qVar4.O0() : 0);
jSONObject.put("skip_change_to_close", z2);
return jSONObject;
}
z3 = o.d().z(String.valueOf(S));
jSONObject.put("voice_control", z3);
jSONObject.put("rv_skip_time", a2);
jSONObject.put("fv_skip_show", c2);
jSONObject.put("iv_skip_time", r);
qVar = this.k;
if (qVar != null) {
}
z = false;
jSONObject.put("show_dislike", z);
com.bytedance.sdk.openadsdk.core.f0.q qVar42 = this.k;
jSONObject.put("video_adaptation", qVar42 != null ? qVar42.O0() : 0);
jSONObject.put("skip_change_to_close", z2);
return jSONObject;
}
public x a(SSWebView sSWebView) {
this.a = new WeakReference<>(sSWebView);
return this;
}
public com.bytedance.sdk.openadsdk.core.f0.q c() {
return this.k;
}
public void d(boolean z) {
this.C = z;
}
public void g(JSONObject jSONObject) {
com.bytedance.sdk.openadsdk.core.f0.q f2 = com.bytedance.sdk.openadsdk.core.b.f(jSONObject);
if (f2 != null) {
com.bytedance.sdk.openadsdk.core.c0.a aVar = new com.bytedance.sdk.openadsdk.core.c0.a(o.a(), f2, this.F, this.h);
aVar.a(wH1.gt65QHUX(o.a(), f2, this.F));
aVar.onClick(null);
}
}
public String d(String str) {
if (this.u != null) {
return com.bytedance.sdk.openadsdk.utils.a0.b(this.h);
}
return this.l == null ? com.bytedance.sdk.openadsdk.utils.a0.c(this.h) : str;
}
public x a(com.bytedance.sdk.openadsdk.d.o oVar) {
this.D = oVar;
return this;
}
public x c(boolean z) {
this.w = z;
return this;
}
public void q() {
com.bytedance.sdk.openadsdk.i.c cVar = this.e;
if (cVar != null) {
cVar.a();
}
if (v()) {
s();
}
}
private void c(String str, JSONObject jSONObject) {
try {
if (TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("__msg_type", NotificationCompat.CATEGORY_EVENT);
jSONObject2.put("__event_id", str);
if (jSONObject != null) {
jSONObject2.put("__params", jSONObject);
}
q(jSONObject2);
} catch (Exception unused) {
}
}
public x a(View view) {
this.f = new WeakReference<>(view);
return this;
}
public boolean m() {
return this.G;
}
public void o() {
com.bytedance.sdk.openadsdk.i.c cVar = this.e;
if (cVar != null) {
cVar.onDestroy();
}
this.L = null;
}
@JProtect
private JSONObject a() {
try {
View view = this.f.get();
SSWebView sSWebView = this.a.get();
if (view != null && sSWebView != null) {
int[] b2 = b0.b(view);
int[] b3 = b0.b((View) sSWebView);
if (b2 != null && b3 != null) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("x", b0.b(o.a(), b2[0] - b3[0]));
jSONObject.put("y", b0.b(o.a(), b2[1] - b3[1]));
jSONObject.put("w", b0.b(o.a(), view.getWidth()));
jSONObject.put("h", b0.b(o.a(), view.getHeight()));
jSONObject.put("isExist", true);
return jSONObject;
}
com.bytedance.sdk.component.utils.m.b("TTAD.AndroidObject", "setCloseButtonInfo error position or webViewPosition is null");
return null;
}
com.bytedance.sdk.component.utils.m.b("TTAD.AndroidObject", "setCloseButtonInfo error closeButton is null");
return null;
} catch (Throwable th) {
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", "setCloseButtonInfo error", th);
return null;
}
}
public JSONObject c(JSONObject jSONObject) {
if (this.A != null) {
if (jSONObject == null) {
jSONObject = new JSONObject();
}
try {
JSONObject jSONObject2 = new JSONObject();
String optString = jSONObject.optString("ad_extra_data", null);
if (optString != null) {
jSONObject2 = new JSONObject(optString);
}
for (Map.Entry<String, Object> entry : this.A.entrySet()) {
jSONObject2.put(entry.getKey(), entry.getValue());
}
jSONObject.put("ad_extra_data", jSONObject2.toString());
} catch (Exception e2) {
com.bytedance.sdk.component.utils.m.b(e2.toString());
}
}
return jSONObject;
}
public void p() {
com.bytedance.sdk.openadsdk.i.c cVar = this.e;
if (cVar != null) {
cVar.b();
}
}
public x a(com.bytedance.sdk.openadsdk.core.f0.q qVar) {
this.k = qVar;
return this;
}
public d8z313Y b() {
return this.E;
}
private void c(String str) {
if (str != null && str.startsWith("bytedance://")) {
try {
if (str.equals("bytedance://dispatch_message/")) {
WebView f2 = f();
if (f2 != null) {
com.bytedance.sdk.component.utils.l.a(f2, "javascript:ToutiaoJSBridge._fetchQueue()");
}
} else if (str.startsWith("bytedance://private/setresult/")) {
int indexOf = str.indexOf(38, 30);
if (indexOf <= 0) {
return;
}
String substring = str.substring(30, indexOf);
String substring2 = str.substring(indexOf + 1);
if (substring.equals("SCENE_FETCHQUEUE") && substring2.length() > 0) {
f(substring2);
}
}
} catch (Exception unused) {
}
}
}
public boolean e(String str) {
return TextUtils.isEmpty(str) || !"click_other".equals(str) || l();
}
public x a(com.bytedance.sdk.openadsdk.k.b bVar) {
this.u = bVar;
return this;
}
public x b(boolean z) {
this.B = z;
return this;
}
public x a(com.bytedance.sdk.openadsdk.k.i iVar) {
this.v = iVar;
return this;
}
public x b(int i2) {
this.h = i2;
return this;
}
public x a(Map<String, Object> map) {
this.A = map;
return this;
}
public x b(List<com.bytedance.sdk.openadsdk.core.f0.q> list) {
this.x = list;
return this;
}
private void b(JSONObject jSONObject) throws Exception {
if (this.f2057J) {
com.bytedance.sdk.openadsdk.core.f0.q qVar = this.k;
if ((qVar instanceof com.bytedance.sdk.openadsdk.core.f0.r) && ((com.bytedance.sdk.openadsdk.core.f0.r) qVar).s1()) {
JSONArray jSONArray = new JSONArray();
jSONObject.put("adInfos", jSONArray);
for (com.bytedance.sdk.openadsdk.core.f0.q qVar2 : ((com.bytedance.sdk.openadsdk.core.f0.r) this.k).r1()) {
JSONObject jSONObject2 = new JSONObject();
a(jSONObject2, qVar2);
jSONArray.put(jSONObject2);
}
return;
}
}
a(jSONObject, this.k);
}
public x a(j3TX451 j3tx451) {
this.l = j3tx451;
return this;
}
public void e(boolean z) {
this.K = z;
}
public x a(com.bytedance.sdk.openadsdk.core.nativeexpress.l lVar) {
this.m = lVar;
return this;
}
public x a(com.bytedance.sdk.openadsdk.i.d dVar) {
this.o = dVar;
return this;
}
public x a(com.bytedance.sdk.openadsdk.core.c0.d dVar) {
this.t = dVar;
return this;
}
public x a(com.bytedance.sdk.openadsdk.k.a aVar) {
this.p = aVar;
return this;
}
public x a(com.bytedance.sdk.openadsdk.k.e eVar) {
this.q = eVar;
return this;
}
public x a(com.bytedance.sdk.openadsdk.k.d dVar) {
this.r = dVar;
return this;
}
public x a(com.bytedance.sdk.openadsdk.k.f fVar) {
this.I = fVar;
return this;
}
@JProtect
private void a(JSONObject jSONObject, int i2) throws Exception {
JSONArray jSONArray = new JSONArray();
for (String str : d()) {
jSONArray.put(str);
}
jSONObject.put(AppKeyManager.APP_NAME_INIT, com.bytedance.sdk.openadsdk.common.a.b());
jSONObject.put("innerAppName", com.bytedance.sdk.openadsdk.common.a.d());
jSONObject.put("aid", com.bytedance.sdk.openadsdk.common.a.a());
jSONObject.put("sdkEdition", com.bytedance.sdk.openadsdk.common.a.f());
jSONObject.put("appVersion", com.bytedance.sdk.openadsdk.common.a.c());
jSONObject.put("netType", com.bytedance.sdk.openadsdk.common.a.e());
jSONObject.put("supportList", jSONArray);
jSONObject.put("deviceId", com.bytedance.sdk.openadsdk.common.a.a(o.a()));
if (DeviceUtils.l(o.a())) {
jSONObject.put("device_platform", "Android_Pad");
} else {
jSONObject.put("device_platform", "Android");
}
jSONObject.put("device_type", Build.VERSION.RELEASE);
}
private void b(String str, JSONObject jSONObject) {
try {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("__msg_type", "callback");
jSONObject2.put("__callback_id", str);
if (jSONObject != null) {
jSONObject2.put("__params", jSONObject);
}
q(jSONObject2);
} catch (Exception unused) {
}
}
boolean l() {
com.bytedance.sdk.openadsdk.core.f0.q qVar = this.k;
return qVar != null && qVar.C() == 1;
}
public void b(@NonNull Uri uri) {
try {
String host = uri.getHost();
if (!"log_event".equals(host) && !"custom_event".equals(host) && !"log_event_v3".equals(host)) {
if (!"private".equals(host) && !"dispatch_message".equals(host)) {
com.bytedance.sdk.component.utils.m.f("TTAD.AndroidObject", "handlrUir: not match schema host");
}
c(uri.toString());
}
com.bytedance.sdk.openadsdk.d.c.a(new i("log_event_handleUri", uri));
} catch (Exception e2) {
com.bytedance.sdk.component.utils.m.c("TTAD.AndroidObject", "handleUri exception: ", e2);
}
}
private void f(String str) {
try {
String str2 = new String(Base64.decode(str, 2));
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", str2);
JSONArray jSONArray = new JSONArray(str2);
int length = jSONArray.length();
for (int i2 = 0; i2 < length; i2++) {
k kVar = new k();
try {
JSONObject optJSONObject = jSONArray.optJSONObject(i2);
if (optJSONObject != null) {
kVar.a = optJSONObject.optString("__msg_type", null);
kVar.f2062b = optJSONObject.optString("__callback_id", null);
kVar.c = optJSONObject.optString("func");
kVar.d = optJSONObject.optJSONObject("params");
kVar.e = optJSONObject.optInt("JSSDK");
}
} catch (Throwable unused) {
}
if (!TextUtils.isEmpty(kVar.a) && !TextUtils.isEmpty(kVar.c)) {
Message obtainMessage = this.f2058b.obtainMessage(11);
obtainMessage.obj = kVar;
this.f2058b.sendMessage(obtainMessage);
}
}
} catch (Exception unused2) {
if (com.bytedance.sdk.component.utils.m.b()) {
com.bytedance.sdk.component.utils.m.f("TTAD.AndroidObject", "failed to parse jsbridge msg queue " + str);
return;
}
com.bytedance.sdk.component.utils.m.f("TTAD.AndroidObject", "failed to parse jsbridge msg queue");
}
}
private static void a(JSONObject jSONObject, com.bytedance.sdk.openadsdk.core.f0.q qVar) throws Exception {
String e2 = qVar.e();
if (!TextUtils.isEmpty(e2)) {
jSONObject.put(BidResponsedEx.KEY_CID, e2);
}
String N2 = qVar.N();
if (!TextUtils.isEmpty(N2)) {
jSONObject.put("log_extra", N2);
}
String D = qVar.D();
if (!TextUtils.isEmpty(D)) {
jSONObject.put(DownloadModel.DOWNLOAD_URL, D);
}
jSONObject.put("dc", TextUtils.isEmpty(o.d().j()) ? o.d().j() : "SG");
jSONObject.put("language", com.bytedance.sdk.openadsdk.utils.a0.d(o.a()));
jSONObject.put("isRTL", com.bytedance.sdk.openadsdk.core.settings.n.j0().R());
}
@JProtect
public JSONObject a(k kVar, int i2) throws Exception {
char c2;
JSONObject jSONObject;
Context context;
JSONObject jSONObject2;
if (NotificationCompat.CATEGORY_CALL.equals(kVar.a)) {
if (com.bytedance.sdk.openadsdk.core.h.a().p()) {
Log.d("TTAD.AndroidObject", "[JSB-REQ] version:" + i2 + " method:" + kVar.c);
}
JSONObject jSONObject3 = new JSONObject();
String str = kVar.c;
str.hashCode();
int i3 = -1;
switch (str.hashCode()) {
case -2036781162:
if (str.equals("subscribe_app_ad")) {
c2 = 0;
break;
}
c2 = 65535;
break;
case -1423303823:
if (str.equals("adInfo")) {
c2 = 1;
break;
}
c2 = 65535;
break;
case -1330994877:
if (str.equals("pauseWebView")) {
c2 = 2;
break;
}
c2 = 65535;
break;
case -1169135450:
if (str.equals("changeVideoState")) {
c2 = 3;
break;
}
c2 = 65535;
break;
case -1023873614:
if (str.equals("openAdLandPageLinks")) {
c2 = 4;
break;
}
c2 = 65535;
break;
case -844321441:
if (str.equals("webview_time_track")) {
c2 = 5;
break;
}
c2 = 65535;
break;
case -800853518:
if (str.equals("clickEvent")) {
c2 = 6;
break;
}
c2 = 65535;
break;
case -794273169:
if (str.equals("appInfo")) {
c2 = 7;
break;
}
c2 = 65535;
break;
case -715147645:
if (str.equals("getScreenSize")) {
c2 = '\b';
break;
}
c2 = 65535;
break;
case -511324706:
if (str.equals("openPrivacy")) {
c2 = '\t';
break;
}
c2 = 65535;
break;
case -489318846:
if (str.equals("getMaterialMeta")) {
c2 = '\n';
break;
}
c2 = 65535;
break;
case -278382602:
if (str.equals("send_temai_product_ids")) {
c2 = 11;
break;
}
c2 = 65535;
break;
case -173752734:
if (str.equals("getTeMaiAds")) {
c2 = '\f';
break;
}
c2 = 65535;
break;
case 27837080:
if (str.equals("download_app_ad")) {
c2 = '\r';
break;
}
c2 = 65535;
break;
case 94756344:
if (str.equals("close")) {
c2 = 14;
break;
}
c2 = 65535;
break;
case 105049135:
if (str.equals("unsubscribe_app_ad")) {
c2 = 15;
break;
}
c2 = 65535;
break;
case 399543522:
if (str.equals("getCloseButtonInfo")) {
c2 = 16;
break;
}
c2 = 65535;
break;
case 402955465:
if (str.equals("isViewable")) {
c2 = 17;
break;
}
c2 = 65535;
break;
case 425443791:
if (str.equals("getNativeSiteCustomData")) {
c2 = 18;
break;
}
c2 = 65535;
break;
case 442647767:
if (str.equals("sendReward")) {
c2 = 19;
break;
}
c2 = 65535;
break;
case 571273292:
if (str.equals("dynamicTrack")) {
c2 = 20;
break;
}
c2 = 65535;
break;
case 650209982:
if (str.equals("getTemplateInfo")) {
c2 = 21;
break;
}
c2 = 65535;
break;
case 672928467:
if (str.equals("cancel_download_app_ad")) {
c2 = 22;
break;
}
c2 = 65535;
break;
case 711635577:
if (str.equals("getCurrentVideoState")) {
c2 = 23;
break;
}
c2 = 65535;
break;
case 885131792:
if (str.equals("getVolume")) {
c2 = 24;
break;
}
c2 = 65535;
break;
case 1107374321:
if (str.equals("pauseWebViewTimers")) {
c2 = 25;
break;
}
c2 = 65535;
break;
case 1151744482:
if (str.equals("muteVideo")) {
c2 = JSONLexer.EOI;
break;
}
c2 = 65535;
break;
case 1237100796:
if (str.equals("renderDidFinish")) {
c2 = 27;
break;
}
c2 = 65535;
break;
case 1532142616:
if (str.equals("removeLoading")) {
c2 = 28;
break;
}
c2 = 65535;
break;
case 1634511418:
if (str.equals("endcard_load")) {
c2 = 29;
break;
}
c2 = 65535;
break;
case 1713585602:
if (str.equals("getNetworkData")) {
c2 = 30;
break;
}
c2 = 65535;
break;
case 1731806400:
if (str.equals("playable_style")) {
c2 = 31;
break;
}
c2 = 65535;
break;
case 1979895452:
if (str.equals("sendLog")) {
c2 = ' ';
break;
}
c2 = 65535;
break;
case 2086000188:
if (str.equals("skipVideo")) {
c2 = '!';
break;
}
c2 = 65535;
break;
case 2105008900:
if (str.equals("landscape_click")) {
c2 = Typography.quote;
break;
}
c2 = 65535;
break;
default:
c2 = 65535;
break;
}
switch (c2) {
case 0:
t();
com.bytedance.sdk.openadsdk.d.c.a(this.k, this.F, 0, (JSONObject) null);
Context context2 = this.L;
if (context2 != null) {
this.e.a(context2, kVar.d, this.g, this.h, this.j);
break;
} else {
com.bytedance.sdk.openadsdk.d.c.a(this.k, this.F, -1, (JSONObject) null);
break;
}
case 1:
b(jSONObject3);
break;
case 2:
i();
break;
case 3:
e(kVar.d);
break;
case 4:
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", "METHOD_OPEN_OPEN_AD_LANDPAGE_LINKS");
p(kVar.d);
break;
case 5:
n(kVar.d);
break;
case 6:
f(kVar.d);
break;
case 7:
a(jSONObject3, kVar.e);
break;
case '\b':
com.bytedance.sdk.openadsdk.k.a aVar = this.p;
if (aVar != null) {
int a2 = aVar.a();
int b2 = this.p.b();
jSONObject3.put("width", a2);
jSONObject3.put("height", b2);
break;
}
break;
case '\t':
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", "openPrivacy");
x();
break;
case '\n':
j(jSONObject3);
break;
case 11:
m(kVar.d);
break;
case '\f':
jSONObject = this.s;
break;
case '\r':
this.G = true;
com.bytedance.sdk.openadsdk.d.c.a(this.k, this.F, 1, (JSONObject) null);
com.bytedance.sdk.openadsdk.core.c0.d dVar = this.t;
if (dVar != null) {
dVar.a(this.w);
break;
} else {
com.bytedance.sdk.openadsdk.i.c cVar = this.e;
if (cVar != null && (context = this.L) != null) {
cVar.a(context, kVar.d, this.F);
break;
} else {
com.bytedance.sdk.openadsdk.d.c.a(this.k, this.F, -2, (JSONObject) null);
break;
}
}
break;
case 14:
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", "METHOD_CLOSE");
g();
break;
case 15:
com.bytedance.sdk.openadsdk.i.c cVar2 = this.e;
if (cVar2 != null) {
cVar2.a(kVar.d);
break;
}
break;
case 16:
jSONObject = a();
break;
case 17:
jSONObject3.put("viewStatus", this.B ? 1 : 0);
break;
case 18:
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", "METHOD_GET_NATIVE_SITE_CUSTOM_DATA");
com.bytedance.sdk.openadsdk.core.f0.q qVar = this.k;
if (qVar != null && !TextUtils.isEmpty(qVar.x())) {
jSONObject3.put("data", this.k.x());
break;
}
break;
case 19:
this.C = true;
com.bytedance.sdk.openadsdk.k.e eVar = this.q;
if (eVar != null) {
eVar.a();
break;
}
break;
case 20:
o(kVar.d);
break;
case 21:
JSONObject jSONObject4 = this.n;
if (jSONObject4 != null) {
jSONObject4.put("setting", e());
com.bytedance.sdk.openadsdk.core.f0.q qVar2 = this.k;
if (qVar2 != null) {
this.n.put("extension", qVar2.P());
}
}
jSONObject3 = this.n;
break;
case 22:
com.bytedance.sdk.openadsdk.i.c cVar3 = this.e;
if (cVar3 != null) {
cVar3.b(kVar.d);
break;
}
break;
case 23:
i(jSONObject3);
break;
case 24:
AudioManager audioManager = (AudioManager) o.a().getSystemService("audio");
if (audioManager != null) {
i3 = audioManager.getStreamVolume(3);
com.bytedance.sdk.component.utils.m.a("TTAD.AndroidObject", "Music volume >>>> AudioManager-->currentVolume=" + i3);
}
jSONObject3.put("endcard_mute", i3 <= 0);
break;
case 25:
j();
break;
case 26:
k(kVar.d);
break;
case 27:
l(kVar.d);
break;
case 28:
com.bytedance.sdk.openadsdk.k.d dVar2 = this.r;
if (dVar2 != null) {
dVar2.a();
break;
}
break;
case 29:
h(kVar.d);
break;
case 30:
a(kVar, jSONObject3);
break;
case 31:
d(jSONObject3);
break;
case ' ':
JSONObject jSONObject5 = kVar.d;
if (jSONObject5 != null && (jSONObject2 = jSONObject5.getJSONObject("extJson")) != null && jSONObject2.has("category") && jSONObject2.has("tag") && jSONObject2.has("label")) {
String string = jSONObject2.getString("category");
String string2 = jSONObject2.getString("tag");
String string3 = jSONObject2.getString("label");
long j2 = jSONObject5.getLong(AppMeasurementSdk.ConditionalUserProperty.VALUE);
long j3 = jSONObject5.getLong("extValue");
try {
jSONObject2.putOpt("ua_policy", Integer.valueOf(this.i));
} catch (Exception unused) {
}
if ("click".equals(string3)) {
jSONObject2 = c(jSONObject2);
}
com.bytedance.sdk.openadsdk.d.c.a(this.k, string, d(string2), string3, j2, j3, jSONObject2);
break;
}
break;
case '!':
k();
break;
case '\"':
Context context3 = this.L;
if (context3 instanceof com.bytedance.sdk.openadsdk.core.j0.c.b) {
((com.bytedance.sdk.openadsdk.core.j0.c.b) context3).d();
break;
}
break;
}
if (i2 == 1 && !TextUtils.isEmpty(kVar.f2062b)) {
b(kVar.f2062b, jSONObject3);
if (com.bytedance.sdk.openadsdk.core.h.a().p()) {
Log.d("TTAD.AndroidObject", "[JSB-RSP] version:" + i2 + " data=" + jSONObject3);
}
}
return jSONObject3;
}
return null;
}
public void f(boolean z) {
this.f2057J = z;
}
private void a(String str, boolean z) {
if (this.D == null || TextUtils.isEmpty(str)) {
return;
}
if (z) {
this.D.e(str);
} else {
this.D.d(str);
}
}
private boolean a(@NonNull JSONObject jSONObject) {
return jSONObject.has("borderRadiusTopLeft") && jSONObject.has("borderRadiusBottomLeft") && jSONObject.has("borderRadiusTopRight") && jSONObject.has("borderRadiusBottomRight");
}
private void a(k kVar, JSONObject jSONObject) {
if (kVar == null) {
return;
}
try {
a(kVar.d, new g(this, jSONObject, kVar));
} catch (Exception unused) {
}
}
@JProtect
private boolean a(String str, int i2, com.bytedance.sdk.openadsdk.core.f0.m mVar) {
HashMap<String, com.bytedance.sdk.openadsdk.core.i> hashMap;
com.bytedance.sdk.openadsdk.core.i iVar;
if (TextUtils.isEmpty(str) || (hashMap = this.y) == null || (iVar = hashMap.get(str)) == null) {
return false;
}
iVar.a(i2, mVar);
return true;
}
public static JSONArray a(List<com.bytedance.sdk.openadsdk.core.f0.q> list) {
JSONArray jSONArray = new JSONArray();
if (list == null) {
return jSONArray;
}
int size = list.size();
for (int i2 = 0; i2 < size; i2++) {
jSONArray.put(list.get(i2).n1());
}
return jSONArray;
}
public boolean a(Uri uri) {
if (uri == null) {
return false;
}
if ("bytedance".equals(uri.getScheme())) {
return N.containsKey(uri.getHost());
}
return false;
}
public void a(int i2) {
com.bytedance.sdk.openadsdk.core.nativeexpress.l lVar = this.m;
if (lVar != null) {
lVar.d(i2);
}
}
@Override
public void a(Message message) {
if (message != null && message.what == 11) {
Object obj = message.obj;
if (obj instanceof k) {
try {
a((k) obj, 1);
} catch (Exception unused) {
}
}
}
}
@Override
public void a(String str, JSONObject jSONObject) {
c(str, jSONObject);
}
public void a(j jVar) {
this.M = jVar;
}
}