正在查看: Uptodown App Store v6.80 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mbridge.msdk.click;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.click.entity.JumpLoaderResult;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.aj;
import com.mbridge.msdk.foundation.tools.aq;
import com.mbridge.msdk.out.Campaign;
import com.mbridge.msdk.out.LoadingActivity;
import com.mbridge.msdk.out.NativeListener;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.mbridge.msdk.scheme.applet.AppletSchemeCallBack;
import com.mbridge.msdk.scheme.applet.AppletsModel;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.json.JSONObject;
public final class a {
public static boolean a = false;
public static Map<String, Long> b = new HashMap();
public static Set<String> c = new HashSet();
private String d;
private long e;
private com.mbridge.msdk.foundation.db.g f;
private Context g;
private d h;
private com.mbridge.msdk.foundation.same.report.h j;
private com.mbridge.msdk.c.g k;
private boolean l;
private boolean o;
private i p;
private NativeListener.NativeTrackingListener i = null;
private boolean m = false;
private boolean n = true;
public a(Context context, String str) {
this.f = null;
this.g = null;
com.mbridge.msdk.c.g b4 = com.mbridge.msdk.c.h.a().b(str);
this.k = b4;
if (b4 == null) {
com.mbridge.msdk.c.h.a();
this.k = com.mbridge.msdk.c.i.a();
}
this.l = this.k.aK();
Context applicationContext = context.getApplicationContext();
this.g = applicationContext;
this.d = str;
if (this.f == null) {
this.f = com.mbridge.msdk.foundation.db.g.a(applicationContext);
}
this.j = new com.mbridge.msdk.foundation.same.report.h(this.g);
}
static void f(a aVar) {
try {
Intent intent = new Intent();
intent.setAction("ExitApp");
aVar.g.sendBroadcast(intent);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonClickControl", "Exception", e);
}
}
}
public static String b(int i) {
return i != 1 ? i != 2 ? i != 3 ? i != 4 ? TtmlNode.ANONYMOUS_REGION_ID : "2000138" : "2000139" : "2000137" : "2000136";
}
public static void a(Context context, CampaignEx campaignEx, String str, String str2, boolean z, boolean z3) {
if (context == null) {
return;
}
new d(context.getApplicationContext()).a(str, campaignEx, null, str2, z, z3, com.mbridge.msdk.click.a.a.f);
}
public static void a(Context context, CampaignEx campaignEx, String str, String[] strArr, boolean z, boolean z3) {
if (context == null || campaignEx == null || TextUtils.isEmpty(str) || strArr == null) {
return;
}
d dVar = new d(context.getApplicationContext());
for (String str2 : strArr) {
dVar.a(str, campaignEx, new f() {
@Override
public final void a(Object obj) {
}
@Override
public final void b(Object obj) {
}
@Override
public final void a(Object obj, String str3) {
}
}, str2, z, z3, com.mbridge.msdk.click.a.a.f);
}
}
private boolean b(CampaignEx campaignEx) {
Long l;
if (campaignEx == null) {
return true;
}
try {
if (2 != campaignEx.getLinkType() && 3 != campaignEx.getLinkType()) {
return true;
}
String id = campaignEx.getId();
Map<String, Long> map = b;
if (map == null) {
return true;
}
if (map.containsKey(id) && (l = b.get(id)) != null) {
if (l.longValue() > System.currentTimeMillis() || c.contains(campaignEx.getId())) {
return false;
}
}
b.put(campaignEx.getId(), Long.valueOf(System.currentTimeMillis() + (campaignEx.getClickTimeOutInterval() * 1000)));
return true;
} catch (Exception e) {
if (!MBridgeConstans.DEBUG) {
return true;
}
e.printStackTrace();
return true;
}
}
public final void a(String str) {
this.d = str;
}
public final void a(NativeListener.NativeTrackingListener nativeTrackingListener) {
this.i = nativeTrackingListener;
}
public final void a(i iVar) {
this.p = iVar;
}
public final void a(boolean z) {
this.n = z;
}
public final void a() {
try {
this.i = null;
} catch (Exception e) {
e.printStackTrace();
}
}
public final void a(CampaignEx campaignEx, NativeListener.NativeAdListener nativeAdListener) {
if (nativeAdListener != null && campaignEx != null) {
nativeAdListener.onAdClick(campaignEx);
}
a(campaignEx);
}
private int b() {
try {
com.mbridge.msdk.c.g gVar = this.k;
if (gVar != null) {
return gVar.Y();
}
return 1;
} catch (Exception e) {
e.printStackTrace();
return 1;
}
}
public final void a(com.mbridge.msdk.foundation.entity.CampaignEx r19) {
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.click.a.a(com.mbridge.msdk.foundation.entity.CampaignEx):void");
}
private AppletSchemeCallBack a(NativeListener.NativeTrackingListener nativeTrackingListener, CampaignEx campaignEx, AppletsModel appletsModel, a aVar) {
return new g(nativeTrackingListener, campaignEx, appletsModel, aVar);
}
private void a(Context context, CampaignEx campaignEx, List<String> list) {
if (context == null) {
com.mbridge.msdk.foundation.same.report.i.a(com.mbridge.msdk.foundation.controller.c.m().c(), campaignEx, 2, "context is null", this.d);
return;
}
boolean z = ab.z() == 1;
boolean z3 = ab.v(context) == 1;
if (z && z3) {
String ghId = campaignEx.getGhId();
String ghPath = campaignEx.getGhPath();
String bindId = campaignEx.getBindId();
String h = com.mbridge.msdk.foundation.controller.c.m().h();
if (!TextUtils.isEmpty(ghId)) {
try {
if (!TextUtils.isEmpty(h)) {
bindId = h;
}
Object b4 = ab.b(bindId);
Class<?> cls = Class.forName("com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram$Req");
Object newInstance = cls.newInstance();
cls.getField("userName").set(newInstance, ghId);
cls.getField(MBridgeConstans.DYNAMIC_VIEW_WX_PATH).set(newInstance, ghPath);
cls.getField("miniprogramType").set(newInstance, cls.getField("MINIPTOGRAM_TYPE_RELEASE").get(null));
Class.forName("com.tencent.mm.opensdk.openapi.IWXAPI").getMethod("sendReq", Class.forName("com.tencent.mm.opensdk.modelbase.BaseReq")).invoke(b4, newInstance);
com.mbridge.msdk.foundation.same.report.i.a(context, campaignEx, 1, TtmlNode.ANONYMOUS_REGION_ID, this.d);
return;
} catch (Throwable th) {
com.mbridge.msdk.foundation.same.report.i.a(context, campaignEx, 2, th.getMessage(), this.d);
a(campaignEx, list);
return;
}
}
a(campaignEx, list);
com.mbridge.msdk.foundation.same.report.i.a(context, campaignEx, 2, "ghid is empty", this.d);
return;
}
com.mbridge.msdk.foundation.same.report.i.a(context, campaignEx, 2, "integrated:" + z + "-hasWx:" + z3, this.d);
a(campaignEx, list);
}
private void a(CampaignEx campaignEx, List<String> list) {
if (b() == 2) {
aj.a(this.g, campaignEx.getClickURL(), campaignEx, this.i, list);
} else {
aj.a(this.g, campaignEx.getClickURL(), this.i, campaignEx, list);
}
}
private void a(final CampaignEx campaignEx, final boolean z, final Boolean bool, final List<String> list) {
final boolean z3;
final boolean z4;
try {
this.e = System.currentTimeMillis();
NativeListener.NativeTrackingListener nativeTrackingListener = this.i;
if (nativeTrackingListener == null || z) {
z3 = true;
} else {
nativeTrackingListener.onStartRedirection(campaignEx, campaignEx.getClickURL());
z3 = !this.i.onInterceptDefaultLoadingDialog();
}
this.o = false;
boolean z5 = true;
if (campaignEx.getJumpResult() != null) {
if (!z) {
a(campaignEx, campaignEx.getJumpResult(), true, this.m, bool, list);
}
this.o = true;
this.m = false;
z5 = false;
}
if (!com.mbridge.msdk.foundation.db.d.a(this.f).a(campaignEx.getId(), this.d) || campaignEx.getJumpResult() == null) {
com.mbridge.msdk.foundation.db.d a4 = com.mbridge.msdk.foundation.db.d.a(this.f);
a4.a();
JumpLoaderResult b4 = a4.b(campaignEx.getId(), this.d);
if (b4 != null && !z) {
campaignEx.setJumpResult(b4);
if (z5) {
a(campaignEx, b4, z5, this.m, bool, list);
this.o = true;
this.m = false;
z4 = false;
}
z4 = z5;
} else {
if (campaignEx.getClick_mode().equals("6") && !campaignEx.getPackageName().isEmpty() && campaignEx.getLinkType() == 2 && !z) {
boolean a5 = aj.a.a(this.g, "market://details?id=" + campaignEx.getPackageName(), this.i);
if (list != null) {
list.add("google_play");
}
if (a5) {
a(campaignEx, 1, 1, list);
}
NativeListener.NativeTrackingListener nativeTrackingListener2 = this.i;
if (nativeTrackingListener2 != null && z5) {
nativeTrackingListener2.onDismissLoading(campaignEx);
this.i.onFinishRedirection(campaignEx, null);
}
this.o = true;
z5 = false;
}
if (z) {
this.o = true;
this.m = false;
z4 = false;
}
z4 = z5;
}
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public final void run() {
if (z3 && !a.a && !a.this.o && MBridgeConstans.NATIVE_SHOW_LOADINGPAGER && !z) {
a.a(a.this, campaignEx);
}
if (z3 || a.this.i == null || a.a || a.this.o || !MBridgeConstans.NATIVE_SHOW_LOADINGPAGER) {
return;
}
a.this.i.onShowLoading(campaignEx);
}
});
d dVar = this.h;
if (dVar != null) {
dVar.a();
}
Set<String> set = c;
if (set != null && set.contains(campaignEx.getId())) {
NativeListener.NativeTrackingListener nativeTrackingListener3 = this.i;
if (nativeTrackingListener3 != null) {
nativeTrackingListener3.onDismissLoading(campaignEx);
this.i.onFinishRedirection(campaignEx, campaignEx.getClickURL());
return;
}
return;
}
Set<String> set2 = c;
if (set2 != null) {
set2.add(campaignEx.getId());
}
d dVar2 = new d(this.g);
this.h = dVar2;
final boolean z6 = z3;
dVar2.a(this.d, campaignEx, new f() {
@Override
public final void a(Object obj) {
}
@Override
public final void b(java.lang.Object r11) {
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.click.a.AnonymousClass4.b(java.lang.Object):void");
}
@Override
public final void a(java.lang.Object r6, java.lang.String r7) {
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.click.a.AnonymousClass4.a(java.lang.Object, java.lang.String):void");
}
});
}
} catch (Exception e) {
e.printStackTrace();
}
}
public final void a(JumpLoaderResult jumpLoaderResult, CampaignEx campaignEx, int i, boolean z) {
if (campaignEx == null || jumpLoaderResult == null) {
return;
}
try {
long currentTimeMillis = System.currentTimeMillis() - this.e;
com.mbridge.msdk.foundation.entity.e eVar = new com.mbridge.msdk.foundation.entity.e();
int m = ab.m(this.g);
eVar.a(m);
eVar.c(ab.a(this.g, m));
eVar.b(campaignEx.getRequestId());
eVar.k(campaignEx.getRequestIdNotice());
eVar.b(i);
eVar.i(currentTimeMillis + TtmlNode.ANONYMOUS_REGION_ID);
eVar.j(campaignEx.getId());
eVar.c(jumpLoaderResult.getType());
if (!TextUtils.isEmpty(jumpLoaderResult.getUrl())) {
eVar.h(URLEncoder.encode(jumpLoaderResult.getUrl(), "utf-8"));
}
eVar.e((this.e / 1000) + TtmlNode.ANONYMOUS_REGION_ID);
eVar.d(Integer.parseInt(campaignEx.getLandingType()));
eVar.e(campaignEx.getLinkType());
eVar.a(this.d);
eVar.c(jumpLoaderResult.getType());
if (!TextUtils.isEmpty(jumpLoaderResult.getUrl())) {
eVar.h(URLEncoder.encode(jumpLoaderResult.getUrl(), "utf-8"));
}
if (this.l) {
eVar.f(jumpLoaderResult.getStatusCode());
if (!TextUtils.isEmpty(jumpLoaderResult.getHeader())) {
eVar.f(URLEncoder.encode(jumpLoaderResult.getHeader(), "utf-8"));
}
if (!TextUtils.isEmpty(jumpLoaderResult.getContent())) {
eVar.g(URLEncoder.encode(jumpLoaderResult.getContent(), C.UTF8_NAME));
}
if (!TextUtils.isEmpty(jumpLoaderResult.getExceptionMsg())) {
eVar.d(URLEncoder.encode(jumpLoaderResult.getExceptionMsg(), "utf-8"));
}
}
if (z) {
JSONObject a4 = com.mbridge.msdk.foundation.entity.e.a(eVar);
if (a4 != null) {
com.mbridge.msdk.foundation.same.report.d.d.a().a(a4);
return;
}
return;
}
ArrayList arrayList = new ArrayList();
arrayList.add(eVar);
ArrayList<JSONObject> a5 = com.mbridge.msdk.foundation.entity.e.a(arrayList);
if (a5 == null || a5.isEmpty()) {
return;
}
int size = a5.size();
int i4 = 0;
while (i4 < size) {
JSONObject jSONObject = a5.get(i4);
i4++;
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
}
} catch (Throwable th) {
af.b("CommonClickControl", th.getMessage());
}
}
public final void a(Campaign campaign, String str) {
try {
if (!TextUtils.isEmpty(str) && campaign != null) {
CampaignEx campaignEx = campaign instanceof CampaignEx ? (CampaignEx) campaign : null;
if (!str.startsWith("market://") && !str.startsWith("https://play.google.com/")) {
return;
}
if (aj.a.a(this.g, str, this.i) || campaignEx == null) {
return;
}
if (!TextUtils.isEmpty(campaignEx.getPackageName())) {
aj.a.a(this.g, "market://details?id=" + campaignEx.getPackageName(), this.i);
return;
}
if (b() == 2) {
aj.a(this.g, campaignEx.getClickURL(), campaignEx, this.i, new ArrayList());
} else {
aj.a(this.g, campaignEx.getClickURL(), this.i, campaignEx, new ArrayList());
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void a(JumpLoaderResult jumpLoaderResult, CampaignEx campaignEx, boolean z) {
a(jumpLoaderResult, campaignEx, 1, z);
}
private void a(int i, String str, CampaignEx campaignEx, NativeListener.NativeTrackingListener nativeTrackingListener, List<String> list) {
try {
if (TextUtils.isEmpty(str)) {
return;
}
if (i == 2) {
aj.a(this.g, str, campaignEx, nativeTrackingListener, list);
} else {
aj.a(this.g, str, nativeTrackingListener, campaignEx, list);
}
} catch (Throwable th) {
if (MBridgeConstans.DEBUG) {
af.b("CommonClickControl", th.getMessage(), th);
}
}
}
private boolean a(com.mbridge.msdk.foundation.entity.CampaignEx r10, com.mbridge.msdk.click.entity.JumpLoaderResult r11, boolean r12, int r13, java.util.List<java.lang.String> r14) {
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.click.a.a(com.mbridge.msdk.foundation.entity.CampaignEx, com.mbridge.msdk.click.entity.JumpLoaderResult, boolean, int, java.util.List):boolean");
}
private boolean a(CampaignEx campaignEx, JumpLoaderResult jumpLoaderResult, boolean z, List<String> list) {
boolean z3 = false;
if (z) {
try {
if (com.mbridge.msdk.e.b.a()) {
b.a(this.g, this.d, campaignEx, campaignEx.getNoticeUrl(), com.mbridge.msdk.foundation.same.a.M);
}
aj.a(this.g, campaignEx.getClickURL(), this.i, campaignEx, list);
z3 = true;
} catch (Throwable th) {
if (MBridgeConstans.DEBUG) {
af.b("CommonClickControl", th.getMessage(), th);
}
return false;
}
}
a(jumpLoaderResult, campaignEx, true);
if (z3) {
NativeListener.NativeTrackingListener nativeTrackingListener = this.i;
if (nativeTrackingListener != null) {
nativeTrackingListener.onFinishRedirection(campaignEx, jumpLoaderResult.getUrl());
return z3;
}
} else {
if (com.mbridge.msdk.e.b.a()) {
a(jumpLoaderResult, campaignEx, true);
}
NativeListener.NativeTrackingListener nativeTrackingListener2 = this.i;
if (nativeTrackingListener2 != null) {
nativeTrackingListener2.onRedirectionFailed(campaignEx, jumpLoaderResult.getUrl());
}
}
return z3;
}
public void a(com.mbridge.msdk.foundation.entity.CampaignEx r9, com.mbridge.msdk.click.entity.JumpLoaderResult r10, boolean r11, boolean r12, java.lang.Boolean r13, java.util.List<java.lang.String> r14) {
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.click.a.a(com.mbridge.msdk.foundation.entity.CampaignEx, com.mbridge.msdk.click.entity.JumpLoaderResult, boolean, boolean, java.lang.Boolean, java.util.List):void");
}
private boolean a(int i, String str) {
try {
if (i == 2) {
if (aj.a.b(str)) {
return true;
}
} else if (!TextUtils.isEmpty(str)) {
return true;
}
return false;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
private void a(CampaignEx campaignEx, int i, int i4, List<String> list) {
try {
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
eVar.a("type", Integer.valueOf(i));
eVar.a("result", Integer.valueOf(i4));
if (list != null) {
eVar.a("click_path", list.toString());
}
com.mbridge.msdk.foundation.same.report.d.d.a().a("2000150", campaignEx, eVar);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonClickControl", e.getMessage());
}
}
}
public static void a(Context context, final CampaignEx campaignEx, String str, final String str2, boolean z, boolean z3, final int i) {
if (context == null) {
return;
}
if (campaignEx != null) {
try {
String b4 = b(i);
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
eVar.a("result", 3);
com.mbridge.msdk.foundation.same.report.d.d.a().a(b4, campaignEx, eVar);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
e.printStackTrace();
}
}
}
final int i4 = TextUtils.isEmpty(str2) ? -1 : str2.startsWith("tcp") ? 1 : 0;
new d(context.getApplicationContext()).a(str, campaignEx, new f() {
@Override
public final void a(Object obj) {
}
@Override
public final void b(Object obj) {
try {
com.mbridge.msdk.foundation.same.report.d.e eVar2 = new com.mbridge.msdk.foundation.same.report.d.e();
eVar2.a("result", 2);
eVar2.a("net_ty", String.valueOf(i4));
if (obj != null && (obj instanceof JumpLoaderResult)) {
JumpLoaderResult jumpLoaderResult = (JumpLoaderResult) obj;
String str3 = jumpLoaderResult.getStatusCode() + TtmlNode.ANONYMOUS_REGION_ID;
eVar2.a("status_code", str3);
if (str3.startsWith(MBridgeConstans.API_REUQEST_CATEGORY_APP)) {
eVar2.a("result", 1);
} else {
String exceptionMsg = jumpLoaderResult.getExceptionMsg();
if (TextUtils.isEmpty(exceptionMsg)) {
exceptionMsg = "UNKNOWN EXCEPTION and Status Code is : " + str3;
}
eVar2.a("failingURL", aq.d(str2));
eVar2.a("reason", exceptionMsg);
}
}
String b5 = a.b(i);
if (campaignEx != null) {
com.mbridge.msdk.foundation.same.report.d.d.a().a(b5, campaignEx, eVar2);
}
} catch (Exception e4) {
if (MBridgeConstans.DEBUG) {
af.b("CommonClickControl", e4.getMessage());
}
}
}
@Override
public final void a(Object obj, String str3) {
try {
String b5 = a.b(i);
com.mbridge.msdk.foundation.same.report.d.e eVar2 = new com.mbridge.msdk.foundation.same.report.d.e();
eVar2.a("result", 2);
if (obj instanceof JumpLoaderResult) {
JumpLoaderResult jumpLoaderResult = (JumpLoaderResult) obj;
String exceptionMsg = jumpLoaderResult.getExceptionMsg();
if (!TextUtils.isEmpty(exceptionMsg)) {
str3 = exceptionMsg;
}
eVar2.a("reason", str3);
eVar2.a("status_code", Integer.valueOf(jumpLoaderResult.getStatusCode()));
}
eVar2.a("code", TtmlNode.ANONYMOUS_REGION_ID);
eVar2.a("failingURL", aq.d(str2));
eVar2.a("net_ty", String.valueOf(i4));
if (campaignEx != null) {
com.mbridge.msdk.foundation.same.report.d.d.a().a(b5, campaignEx, eVar2);
}
} catch (Exception e4) {
if (MBridgeConstans.DEBUG) {
af.b("CommonClickControl", e4.getMessage());
}
}
}
}, str2, z, z3, i);
}
static void a(a aVar, CampaignEx campaignEx) {
try {
Intent intent = new Intent(aVar.g, (Class<?>) LoadingActivity.class);
intent.setFlags(268435456);
intent.putExtra(CampaignEx.JSON_KEY_ICON_URL, campaignEx.getIconUrl());
aVar.g.startActivity(intent);
} catch (Exception e) {
if (MBridgeConstans.DEBUG) {
af.b("CommonClickControl", "Exception", e);
}
}
}
static void a(a aVar, final boolean z, final Campaign campaign) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public final void run() {
if (z && !a.a && MBridgeConstans.NATIVE_SHOW_LOADINGPAGER) {
a.f(a.this);
}
if (a.this.i == null || a.a || !MBridgeConstans.NATIVE_SHOW_LOADINGPAGER) {
return;
}
a.this.i.onDismissLoading(campaign);
}
});
}
}