- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
2216 lines
107 KiB
Java
2216 lines
107 KiB
Java
package com.mbridge.msdk.reward.adapter;
|
||
|
||
import android.app.Activity;
|
||
import android.content.Context;
|
||
import android.content.Intent;
|
||
import android.os.Bundle;
|
||
import android.os.Handler;
|
||
import android.os.Looper;
|
||
import android.os.Message;
|
||
import android.text.TextUtils;
|
||
import androidx.work.WorkRequest;
|
||
import com.google.android.gms.drive.DriveFile;
|
||
import com.ironsource.adapters.mintegral.MintegralAdapter;
|
||
import com.mbridge.msdk.MBridgeConstans;
|
||
import com.mbridge.msdk.c.g;
|
||
import com.mbridge.msdk.c.i;
|
||
import com.mbridge.msdk.foundation.b.a;
|
||
import com.mbridge.msdk.foundation.download.download.H5DownLoadManager;
|
||
import com.mbridge.msdk.foundation.download.download.ResDownloadCheckManager;
|
||
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
||
import com.mbridge.msdk.foundation.entity.CampaignUnit;
|
||
import com.mbridge.msdk.foundation.same.report.d.e;
|
||
import com.mbridge.msdk.foundation.tools.af;
|
||
import com.mbridge.msdk.foundation.tools.ak;
|
||
import com.mbridge.msdk.foundation.tools.ap;
|
||
import com.mbridge.msdk.reward.adapter.b;
|
||
import com.mbridge.msdk.reward.player.MBRewardVideoActivity;
|
||
import com.mbridge.msdk.video.bt.module.b.h;
|
||
import com.mbridge.msdk.videocommon.a;
|
||
import com.mbridge.msdk.videocommon.download.j;
|
||
import com.tapjoy.TJAdUnitConstants;
|
||
import java.util.Iterator;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.concurrent.CopyOnWriteArrayList;
|
||
import org.json.JSONObject;
|
||
|
||
/* loaded from: classes4.dex */
|
||
public final class c {
|
||
private boolean A;
|
||
private String C;
|
||
private int D;
|
||
private int E;
|
||
private int F;
|
||
private CampaignUnit G;
|
||
private CopyOnWriteArrayList<CampaignEx> H;
|
||
private String K;
|
||
private a L;
|
||
private List<CampaignEx> S;
|
||
private CopyOnWriteArrayList<CampaignEx> T;
|
||
private List<CampaignEx> U;
|
||
private Context k;
|
||
private String l;
|
||
private String m;
|
||
private int n;
|
||
private int o;
|
||
private int p;
|
||
private boolean q;
|
||
private String r;
|
||
private h s;
|
||
private volatile com.mbridge.msdk.reward.adapter.a t;
|
||
private com.mbridge.msdk.videocommon.d.c u;
|
||
private boolean z;
|
||
private boolean v = false;
|
||
private boolean w = false;
|
||
public Object a = new Object();
|
||
private CopyOnWriteArrayList<CampaignEx> x = new CopyOnWriteArrayList<>();
|
||
private int y = 2;
|
||
private String B = "";
|
||
private boolean I = false;
|
||
private long J = 0;
|
||
private boolean M = false;
|
||
private boolean N = false;
|
||
public String b = "";
|
||
public String c = "";
|
||
public String d = "";
|
||
private Handler O = new Handler(Looper.getMainLooper()) { // from class: com.mbridge.msdk.reward.adapter.c.1
|
||
/* JADX WARN: Multi-variable type inference failed */
|
||
/* JADX WARN: Removed duplicated region for block: B:118:0x02ef */
|
||
/* JADX WARN: Removed duplicated region for block: B:119:0x02f1 */
|
||
@Override // android.os.Handler
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
public final void handleMessage(android.os.Message r19) {
|
||
/*
|
||
Method dump skipped, instructions count: 1356
|
||
To view this dump add '--comments-level debug' option
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.adapter.c.AnonymousClass1.handleMessage(android.os.Message):void");
|
||
}
|
||
};
|
||
private boolean P = false;
|
||
private long Q = 0;
|
||
volatile boolean e = false;
|
||
volatile boolean f = false;
|
||
volatile boolean g = false;
|
||
volatile boolean h = false;
|
||
volatile boolean i = false;
|
||
public volatile boolean j = false;
|
||
private String R = "";
|
||
|
||
public final String a() {
|
||
return this.l;
|
||
}
|
||
|
||
public final void a(int i) {
|
||
this.y = i;
|
||
}
|
||
|
||
public final void a(int i, int i2, int i3) {
|
||
this.D = i;
|
||
this.E = i2;
|
||
this.F = i3;
|
||
}
|
||
|
||
public final void a(com.mbridge.msdk.reward.adapter.a aVar) {
|
||
this.t = aVar;
|
||
}
|
||
|
||
public final void a(String str) {
|
||
this.B = str;
|
||
}
|
||
|
||
public final void a(List<CampaignEx> list) {
|
||
this.U = list;
|
||
}
|
||
|
||
public final void b(boolean z) {
|
||
this.z = z;
|
||
}
|
||
|
||
public final void c(boolean z) {
|
||
this.A = z;
|
||
}
|
||
|
||
public final CopyOnWriteArrayList<CampaignEx> d() {
|
||
return this.H;
|
||
}
|
||
|
||
public final CopyOnWriteArrayList<CampaignEx> e() {
|
||
return this.T;
|
||
}
|
||
|
||
public final void e(boolean z) {
|
||
this.P = z;
|
||
}
|
||
|
||
public final String a(boolean z) {
|
||
CopyOnWriteArrayList<CampaignEx> a2;
|
||
CampaignEx campaignEx;
|
||
if (!z) {
|
||
return this.b;
|
||
}
|
||
if (TextUtils.isEmpty(this.c) && (a2 = com.mbridge.msdk.videocommon.download.b.getInstance().a(this.l)) != null && a2.size() > 0 && (campaignEx = a2.get(0)) != null) {
|
||
this.c = campaignEx.getRequestId();
|
||
}
|
||
return this.c;
|
||
}
|
||
|
||
public final boolean a(CampaignEx campaignEx, boolean z, com.mbridge.msdk.foundation.c.b bVar, int i, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
com.mbridge.msdk.foundation.b.c cVar2;
|
||
com.mbridge.msdk.foundation.b.c cVar3 = new com.mbridge.msdk.foundation.b.c();
|
||
com.mbridge.msdk.reward.a.a aVar = new com.mbridge.msdk.reward.a.a(this.l, this.z);
|
||
boolean z2 = false;
|
||
if (aVar.a(this.K)) {
|
||
return false;
|
||
}
|
||
if (!this.j) {
|
||
this.j = true;
|
||
cVar3 = aVar.a(this.K, cVar, campaignEx, bVar, i, this);
|
||
if (cVar3 != null && cVar3.g() > com.mbridge.msdk.foundation.b.c.a) {
|
||
if (cVar3.a() != null && cVar3.a().size() > 0) {
|
||
a(cVar3.a(), true, true);
|
||
} else if (cVar3.g() == com.mbridge.msdk.foundation.b.c.c && bVar != null) {
|
||
bVar.a(com.mbridge.msdk.foundation.c.a.b(880038));
|
||
bVar.c(cVar3.b());
|
||
}
|
||
}
|
||
cVar2 = cVar3;
|
||
aVar.a(cVar, this.K, cVar2, (List<a.C0195a>) null, (JSONObject) null, 3);
|
||
return z2;
|
||
}
|
||
cVar3.d("isCandidate:false");
|
||
cVar3.a(com.mbridge.msdk.foundation.b.c.c);
|
||
cVar2 = cVar3;
|
||
z2 = true;
|
||
aVar.a(cVar, this.K, cVar2, (List<a.C0195a>) null, (JSONObject) null, 3);
|
||
return z2;
|
||
}
|
||
|
||
public c(Context context, String str, String str2) {
|
||
try {
|
||
this.k = context.getApplicationContext();
|
||
this.l = str2;
|
||
this.m = str;
|
||
} catch (Exception e) {
|
||
e.printStackTrace();
|
||
}
|
||
}
|
||
|
||
public final void a(com.mbridge.msdk.videocommon.d.c cVar) {
|
||
try {
|
||
this.u = cVar;
|
||
if (cVar == null || cVar.D() * 1000 == com.mbridge.msdk.foundation.same.a.L) {
|
||
return;
|
||
}
|
||
com.mbridge.msdk.foundation.same.a.L = this.u.D() * 1000;
|
||
} catch (Throwable th) {
|
||
af.b("RewardMVVideoAdapter", th.getMessage(), th);
|
||
}
|
||
}
|
||
|
||
private boolean a(List<CampaignEx> list, boolean z, int i, boolean z2) {
|
||
return a(list, z, i, false, z2);
|
||
}
|
||
|
||
public final boolean a(List<CampaignEx> list, boolean z, int i) {
|
||
return a(list, z, i, false, false);
|
||
}
|
||
|
||
public final boolean a(List<CampaignEx> list, boolean z) {
|
||
if (list != null && list.size() > 0) {
|
||
CampaignEx campaignEx = list.get(0);
|
||
if (campaignEx == null) {
|
||
return false;
|
||
}
|
||
com.mbridge.msdk.videocommon.download.b bVar = com.mbridge.msdk.videocommon.download.b.getInstance();
|
||
String str = this.l;
|
||
j c = bVar.c(str);
|
||
if (c == null) {
|
||
c = bVar.createUnitCache(com.mbridge.msdk.foundation.controller.c.m().c(), str, (CopyOnWriteArrayList<CampaignEx>) list, 94, (com.mbridge.msdk.videocommon.listener.a) null);
|
||
}
|
||
if (c != null && c.a(list, str)) {
|
||
if (z) {
|
||
if (campaignEx.isDynamicView()) {
|
||
return true;
|
||
}
|
||
if (campaignEx.getRsIgnoreCheckRule() != null && campaignEx.getRsIgnoreCheckRule().size() > 0) {
|
||
if (campaignEx.getRsIgnoreCheckRule().contains(3)) {
|
||
af.c("RewardMVVideoAdapter", "Is not check big template download status");
|
||
return true;
|
||
}
|
||
if (campaignEx.getCMPTEntryUrl().equals(campaignEx.getendcard_url()) && campaignEx.getRsIgnoreCheckRule().contains(2)) {
|
||
af.c("RewardMVVideoAdapter", "Is not check big template ENDCARD download status");
|
||
return true;
|
||
}
|
||
}
|
||
if (ResDownloadCheckManager.getInstance().checkPreLoadState(this.l + "_" + campaignEx.getRequestId() + "_" + campaignEx.getCMPTEntryUrl())) {
|
||
af.a("RewardVideoController", "大模板业务,开始检查大模板预加载情况,大模板预加载成功");
|
||
return true;
|
||
}
|
||
} else {
|
||
if (campaignEx.isDynamicView()) {
|
||
return true;
|
||
}
|
||
if (campaignEx.getRsIgnoreCheckRule() != null && campaignEx.getRsIgnoreCheckRule().size() > 0 && campaignEx.getRsIgnoreCheckRule().contains(1)) {
|
||
af.c("RewardMVVideoAdapter", "Is not check template download status");
|
||
return true;
|
||
}
|
||
if (campaignEx.getRewardTemplateMode() != null && !TextUtils.isEmpty(campaignEx.getRewardTemplateMode().e())) {
|
||
if (ResDownloadCheckManager.getInstance().checkPreLoadState(this.l + "_" + campaignEx.getRequestId() + "_" + campaignEx.getRewardTemplateMode().e())) {
|
||
af.a("RewardVideoController", "非大模板业务,存在播放模板,播放模板预加载成功");
|
||
return true;
|
||
}
|
||
} else {
|
||
af.a("RewardVideoController", "非大模板 没有 template");
|
||
return true;
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
af.a("RewardVideoController", "数据为空");
|
||
}
|
||
return false;
|
||
}
|
||
|
||
public final boolean a(List<CampaignEx> list, boolean z, int i, boolean z2, boolean z3) {
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
e eVar = new e();
|
||
if (list != null && list.size() > 0) {
|
||
CampaignEx campaignEx = list.get(0);
|
||
boolean a2 = com.mbridge.msdk.videocommon.download.b.getInstance().a(94, this.l, this.A, list.size(), z, i, list, z2, eVar);
|
||
eVar.a(TJAdUnitConstants.PARAM_PLACEMENT_NAME, "is_ready_crwtpl_" + a2);
|
||
if (z3) {
|
||
a(cVar, eVar, list);
|
||
}
|
||
if (a2) {
|
||
if (z) {
|
||
if (campaignEx.isDynamicView()) {
|
||
return true;
|
||
}
|
||
if (campaignEx.getRsIgnoreCheckRule() != null && campaignEx.getRsIgnoreCheckRule().size() > 0) {
|
||
if (campaignEx.getRsIgnoreCheckRule().contains(3)) {
|
||
af.c("RewardMVVideoAdapter", "Is not check big template download status");
|
||
return true;
|
||
}
|
||
if (campaignEx.getCMPTEntryUrl().equals(campaignEx.getendcard_url()) && campaignEx.getRsIgnoreCheckRule().contains(2)) {
|
||
af.c("RewardMVVideoAdapter", "Is not check big template of ENDCARD download status");
|
||
return true;
|
||
}
|
||
}
|
||
if (ResDownloadCheckManager.getInstance().checkPreLoadState(this.l + "_" + campaignEx.getRequestId() + "_" + campaignEx.getCMPTEntryUrl())) {
|
||
return true;
|
||
}
|
||
if (z3) {
|
||
eVar.a(TJAdUnitConstants.PARAM_PLACEMENT_NAME, "is_ready_crwtpl_" + a2);
|
||
eVar.a("reason", "h5 big template checkPreLoadState error");
|
||
a(cVar, eVar, list);
|
||
}
|
||
} else {
|
||
if (campaignEx != null && campaignEx.isDynamicView()) {
|
||
return true;
|
||
}
|
||
if (campaignEx != null && campaignEx.getRsIgnoreCheckRule() != null && campaignEx.getRsIgnoreCheckRule().size() > 0 && campaignEx.getRsIgnoreCheckRule().contains(1)) {
|
||
af.c("RewardMVVideoAdapter", "Is not check template download status");
|
||
return true;
|
||
}
|
||
if (campaignEx == null || campaignEx.getRewardTemplateMode() == null || TextUtils.isEmpty(campaignEx.getRewardTemplateMode().e())) {
|
||
return true;
|
||
}
|
||
String str = this.l + "_" + campaignEx.getRequestId() + "_" + campaignEx.getRewardTemplateMode().e();
|
||
if (z3) {
|
||
ResDownloadCheckManager.getInstance().setTemplatePreLoadDone(str, true);
|
||
}
|
||
if (ResDownloadCheckManager.getInstance().checkPreLoadState(str)) {
|
||
return true;
|
||
}
|
||
if (z3) {
|
||
eVar.a(TJAdUnitConstants.PARAM_PLACEMENT_NAME, "is_ready_crwtpl_" + a2);
|
||
eVar.a("reason", "h5 template checkPreLoadState error");
|
||
a(cVar, eVar, list);
|
||
}
|
||
}
|
||
}
|
||
} else {
|
||
eVar.a(TJAdUnitConstants.PARAM_PLACEMENT_NAME, "is_ready_crwtpl_empty");
|
||
eVar.a("reason", "campaign list is empty error");
|
||
}
|
||
a(cVar, eVar, list);
|
||
return false;
|
||
}
|
||
|
||
public final boolean b() {
|
||
return d(false);
|
||
}
|
||
|
||
public final boolean d(boolean z) {
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
CopyOnWriteArrayList<CampaignEx> a2 = com.mbridge.msdk.videocommon.a.a.a().a(this.l, 1, this.A, this.B);
|
||
if (a2 != null && a2.size() > 0) {
|
||
CampaignEx campaignEx = a2.get(0);
|
||
int b2 = com.mbridge.msdk.videocommon.a.a.a().b(this.l, 1, this.A, this.B);
|
||
if (TextUtils.isEmpty(campaignEx.getCMPTEntryUrl()) || campaignEx.getNscpt() != 1 || a2.size() >= b2) {
|
||
return a(a2, !TextUtils.isEmpty(campaignEx.getCMPTEntryUrl()), campaignEx.getNscpt(), z);
|
||
}
|
||
if (z) {
|
||
e eVar = new e();
|
||
eVar.a(TJAdUnitConstants.PARAM_PLACEMENT_NAME, "is_ready_cltr");
|
||
eVar.a("reason", "nscpt error");
|
||
a(cVar, eVar, a2);
|
||
}
|
||
return false;
|
||
}
|
||
af.a("RewardVideoController", "database has not can use data");
|
||
if (z) {
|
||
e eVar2 = new e();
|
||
eVar2.a(TJAdUnitConstants.PARAM_PLACEMENT_NAME, "is_ready_cse");
|
||
eVar2.a("reason", "no effective campaign list");
|
||
}
|
||
return false;
|
||
}
|
||
|
||
public final boolean c() {
|
||
List<CampaignEx> c = com.mbridge.msdk.videocommon.a.a.a().c(this.l, 1, this.A, this.B);
|
||
if (c != null && c.size() > 0) {
|
||
CampaignEx campaignEx = c.get(0);
|
||
int b2 = com.mbridge.msdk.videocommon.a.a.a().b(this.l, 1, this.A, this.B);
|
||
if (TextUtils.isEmpty(campaignEx.getCMPTEntryUrl()) || campaignEx.getNscpt() != 1 || c.size() >= b2) {
|
||
return a(c, !TextUtils.isEmpty(campaignEx.getCMPTEntryUrl()), campaignEx.getNscpt());
|
||
}
|
||
return false;
|
||
}
|
||
af.a("test_isReay_db", "database has not can use data");
|
||
return false;
|
||
}
|
||
|
||
public final void a(h hVar, String str, String str2, int i, String str3, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
try {
|
||
this.s = hVar;
|
||
if (this.k != null && !ap.a(this.l)) {
|
||
Intent intent = new Intent(this.k, (Class<?>) MBRewardVideoActivity.class);
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_UNITID, this.l);
|
||
intent.putExtra(MBridgeConstans.PLACEMENT_ID, this.m);
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_REWARD, str);
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_MUTE, i);
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_ISIV, this.z);
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_ISBID, this.A);
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_EXTRADATA, str3);
|
||
CopyOnWriteArrayList<CampaignEx> a2 = com.mbridge.msdk.videocommon.download.b.getInstance().a(this.l);
|
||
boolean z = false;
|
||
if (a2 == null || a2.size() <= 0) {
|
||
h hVar2 = this.s;
|
||
if (hVar2 != null) {
|
||
hVar2.a(cVar, "load failed");
|
||
return;
|
||
}
|
||
} else {
|
||
CampaignEx campaignEx = a2.get(0);
|
||
if (campaignEx != null) {
|
||
this.c = campaignEx.getRequestId();
|
||
}
|
||
if (campaignEx != null && !TextUtils.isEmpty(campaignEx.getCMPTEntryUrl())) {
|
||
z = true;
|
||
}
|
||
g();
|
||
}
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_ISBIG_OFFER, z);
|
||
if (this.z) {
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_IVREWARD_MODETYPE, this.D);
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_IVREWARD_VALUETYPE, this.E);
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_IVREWARD_VALUE, this.F);
|
||
}
|
||
if (!TextUtils.isEmpty(str2)) {
|
||
intent.putExtra(MBRewardVideoActivity.INTENT_USERID, str2);
|
||
}
|
||
RewardUnitCacheManager.getInstance().add(this.m, this.l, this.u);
|
||
try {
|
||
if (com.mbridge.msdk.foundation.controller.c.m() != null && com.mbridge.msdk.foundation.controller.c.m().e() != null) {
|
||
((Activity) com.mbridge.msdk.foundation.controller.c.m().e()).startActivity(intent);
|
||
return;
|
||
}
|
||
} catch (Throwable th) {
|
||
af.b("RewardMVVideoAdapter", th.getMessage());
|
||
}
|
||
intent.addFlags(DriveFile.MODE_READ_ONLY);
|
||
this.k.startActivity(intent);
|
||
return;
|
||
}
|
||
h hVar3 = this.s;
|
||
if (hVar3 != null) {
|
||
hVar3.a(cVar, "context or unitid is null");
|
||
}
|
||
} catch (Exception e) {
|
||
e.printStackTrace();
|
||
h hVar4 = this.s;
|
||
if (hVar4 != null) {
|
||
hVar4.a(cVar, "show failed, exception is " + e.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
/* JADX WARN: Removed duplicated region for block: B:16:0x0078 A[Catch: Exception -> 0x0042, TryCatch #0 {Exception -> 0x0042, blocks: (B:11:0x0027, B:13:0x002d, B:14:0x0072, B:16:0x0078, B:18:0x0080, B:24:0x0044, B:26:0x004a, B:27:0x004e, B:29:0x0054, B:32:0x005c, B:35:0x0066), top: B:8:0x0024 }] */
|
||
/* JADX WARN: Removed duplicated region for block: B:22:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
private void g() {
|
||
/*
|
||
r4 = this;
|
||
com.mbridge.msdk.foundation.controller.c r0 = com.mbridge.msdk.foundation.controller.c.m()
|
||
android.content.Context r0 = r0.c()
|
||
com.mbridge.msdk.foundation.db.b r0 = com.mbridge.msdk.foundation.db.b.a(r0)
|
||
java.lang.String r1 = r4.l
|
||
java.lang.String r2 = r4.c
|
||
java.util.List r0 = r0.a(r1, r2)
|
||
if (r0 == 0) goto La7
|
||
int r1 = r0.size()
|
||
java.lang.String r2 = r4.l
|
||
java.lang.String r2 = com.mbridge.msdk.foundation.same.a.b.b(r2)
|
||
if (r1 != 0) goto L23
|
||
return
|
||
L23:
|
||
r3 = 1
|
||
if (r1 != r3) goto L44
|
||
r1 = 0
|
||
java.lang.Object r3 = r0.get(r1) // Catch: java.lang.Exception -> L42
|
||
if (r3 == 0) goto L6f
|
||
java.lang.Object r3 = r0.get(r1) // Catch: java.lang.Exception -> L42
|
||
com.mbridge.msdk.foundation.entity.d r3 = (com.mbridge.msdk.foundation.entity.d) r3 // Catch: java.lang.Exception -> L42
|
||
java.lang.String r3 = r3.d() // Catch: java.lang.Exception -> L42
|
||
java.lang.Object r0 = r0.get(r1) // Catch: java.lang.Exception -> L42
|
||
com.mbridge.msdk.foundation.entity.d r0 = (com.mbridge.msdk.foundation.entity.d) r0 // Catch: java.lang.Exception -> L42
|
||
java.lang.String r0 = r0.b() // Catch: java.lang.Exception -> L42
|
||
goto L72
|
||
L42:
|
||
r0 = move-exception
|
||
goto L9e
|
||
L44:
|
||
boolean r1 = android.text.TextUtils.isEmpty(r2) // Catch: java.lang.Exception -> L42
|
||
if (r1 != 0) goto L6f
|
||
java.util.Iterator r0 = r0.iterator() // Catch: java.lang.Exception -> L42
|
||
L4e:
|
||
boolean r1 = r0.hasNext() // Catch: java.lang.Exception -> L42
|
||
if (r1 == 0) goto L6f
|
||
java.lang.Object r1 = r0.next() // Catch: java.lang.Exception -> L42
|
||
com.mbridge.msdk.foundation.entity.d r1 = (com.mbridge.msdk.foundation.entity.d) r1 // Catch: java.lang.Exception -> L42
|
||
if (r1 == 0) goto L4e
|
||
java.lang.String r3 = r1.a() // Catch: java.lang.Exception -> L42
|
||
boolean r3 = r2.equals(r3) // Catch: java.lang.Exception -> L42
|
||
if (r3 == 0) goto L4e
|
||
java.lang.String r3 = r1.d() // Catch: java.lang.Exception -> L42
|
||
java.lang.String r0 = r1.b() // Catch: java.lang.Exception -> L42
|
||
goto L72
|
||
L6f:
|
||
java.lang.String r3 = ""
|
||
r0 = r3
|
||
L72:
|
||
boolean r1 = android.text.TextUtils.isEmpty(r3) // Catch: java.lang.Exception -> L42
|
||
if (r1 != 0) goto La7
|
||
java.lang.String r1 = r4.c // Catch: java.lang.Exception -> L42
|
||
boolean r1 = r3.equals(r1) // Catch: java.lang.Exception -> L42
|
||
if (r1 == 0) goto La7
|
||
com.mbridge.msdk.foundation.controller.c r1 = com.mbridge.msdk.foundation.controller.c.m() // Catch: java.lang.Exception -> L42
|
||
android.content.Context r1 = r1.c() // Catch: java.lang.Exception -> L42
|
||
com.mbridge.msdk.foundation.db.b r1 = com.mbridge.msdk.foundation.db.b.a(r1) // Catch: java.lang.Exception -> L42
|
||
java.lang.String r3 = r4.l // Catch: java.lang.Exception -> L42
|
||
r1.b(r2, r3) // Catch: java.lang.Exception -> L42
|
||
java.lang.String r1 = r4.l // Catch: java.lang.Exception -> L42
|
||
java.lang.String r2 = r4.c // Catch: java.lang.Exception -> L42
|
||
com.mbridge.msdk.foundation.same.a.b.a(r1, r2, r0) // Catch: java.lang.Exception -> L42
|
||
java.lang.String r0 = r4.l // Catch: java.lang.Exception -> L42
|
||
com.mbridge.msdk.foundation.same.a.b.c(r0) // Catch: java.lang.Exception -> L42
|
||
goto La7
|
||
L9e:
|
||
java.lang.String r1 = "RewardMVVideoAdapter"
|
||
java.lang.String r0 = r0.getMessage()
|
||
com.mbridge.msdk.foundation.tools.af.a(r1, r0)
|
||
La7:
|
||
return
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.adapter.c.g():void");
|
||
}
|
||
|
||
public final void a(int i, int i2, boolean z, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
a(i, i2, z, "", this.I, cVar);
|
||
}
|
||
|
||
public final void a(int i, int i2, boolean z, String str, boolean z2, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
CampaignEx campaignEx;
|
||
this.o = i;
|
||
this.p = i2;
|
||
this.q = z;
|
||
this.K = str;
|
||
this.I = z2;
|
||
boolean z3 = false;
|
||
this.j = false;
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList = this.H;
|
||
if (copyOnWriteArrayList != null && copyOnWriteArrayList.size() > 0 && (campaignEx = this.H.get(0)) != null && TextUtils.isEmpty(campaignEx.getNLRid())) {
|
||
this.H.clear();
|
||
}
|
||
List<CampaignEx> list = this.S;
|
||
if (list != null) {
|
||
list.clear();
|
||
}
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList2 = this.T;
|
||
if (copyOnWriteArrayList2 != null) {
|
||
copyOnWriteArrayList2.clear();
|
||
}
|
||
this.e = false;
|
||
this.f = false;
|
||
synchronized (this.a) {
|
||
try {
|
||
if (this.g) {
|
||
this.g = false;
|
||
}
|
||
} catch (Throwable th) {
|
||
throw th;
|
||
}
|
||
}
|
||
this.i = false;
|
||
this.h = false;
|
||
try {
|
||
z3 = com.mbridge.msdk.mbsignalcommon.webEnvCheck.a.a(this.k);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardMVVideoAdapter", e.getMessage());
|
||
}
|
||
}
|
||
if (!z3) {
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880001, "errorCode: 3507 errorMessage: data load failed, errorMsg is WebView is not available");
|
||
if (cVar != null) {
|
||
cVar.a(b2);
|
||
}
|
||
b("errorCode: 3507 errorMessage: data load failed, errorMsg is WebView is not available", cVar);
|
||
return;
|
||
}
|
||
if (this.k == null) {
|
||
com.mbridge.msdk.foundation.c.b b3 = com.mbridge.msdk.foundation.c.a.b(880001, "errorCode: 3507 errorMessage: data load failed, errorMsg is Context is null");
|
||
if (cVar != null) {
|
||
cVar.a(b3);
|
||
}
|
||
b("errorCode: 3507 errorMessage: data load failed, errorMsg is Context is null", cVar);
|
||
return;
|
||
}
|
||
if (ap.a(this.l)) {
|
||
com.mbridge.msdk.foundation.c.b b4 = com.mbridge.msdk.foundation.c.a.b(880001, "errorCode: 3507 errorMessage: data load failed, errorMsg is UnitId is null");
|
||
if (cVar != null) {
|
||
cVar.a(b4);
|
||
}
|
||
b("errorCode: 3507 errorMessage: data load failed, errorMsg is UnitId is null", cVar);
|
||
return;
|
||
}
|
||
if (this.u == null) {
|
||
com.mbridge.msdk.foundation.c.b b5 = com.mbridge.msdk.foundation.c.a.b(880001, "errorCode: 3507 errorMessage: data load failed, errorMsg is RewardUnitSetting is null");
|
||
if (cVar != null) {
|
||
cVar.a(b5);
|
||
}
|
||
b("RewardUnitSetting is null", cVar);
|
||
return;
|
||
}
|
||
l();
|
||
m();
|
||
af.c("RewardMVVideoAdapter", "load 开始清除过期数据");
|
||
i();
|
||
b(str, z2, cVar);
|
||
}
|
||
|
||
private void a(String str, boolean z, final com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
boolean z2;
|
||
try {
|
||
if (this.k == null) {
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880001, "errorCode: 3507 errorMessage: data load failed, errorMsg is Context is null");
|
||
if (cVar != null) {
|
||
cVar.a(b2);
|
||
}
|
||
b("errorCode: 3507 errorMessage: data load failed, errorMsg is Context is null", cVar);
|
||
return;
|
||
}
|
||
if (ap.a(this.l)) {
|
||
com.mbridge.msdk.foundation.c.b b3 = com.mbridge.msdk.foundation.c.a.b(880001, "errorCode: 3507 errorMessage: data load failed, errorMsg is UnitId is null");
|
||
if (cVar != null) {
|
||
cVar.a(b3);
|
||
}
|
||
b("errorCode: 3507 errorMessage: data load failed, errorMsg is UnitId is null", cVar);
|
||
return;
|
||
}
|
||
if (this.u == null) {
|
||
com.mbridge.msdk.foundation.c.b b4 = com.mbridge.msdk.foundation.c.a.b(880001, "errorCode: 3507 errorMessage: data load failed, errorMsg is RewardUnitSetting is null");
|
||
if (cVar != null) {
|
||
cVar.a(b4);
|
||
}
|
||
b("errorCode: 3507 errorMessage: data load failed, errorMsg is RewardUnitSetting is null", cVar);
|
||
return;
|
||
}
|
||
if (TextUtils.isEmpty(str)) {
|
||
if (System.currentTimeMillis() - this.J < this.u.a() * 1000) {
|
||
com.mbridge.msdk.foundation.c.b b5 = com.mbridge.msdk.foundation.c.a.b(880018, "errorCode: 3507 errorMessage: data load failed, errorMsg is " + MintegralAdapter.MINTERGRAL_NO_FILL_EXCEPTION_RETURN_EMPTY);
|
||
if (cVar != null) {
|
||
cVar.a(b5);
|
||
cVar.c(true);
|
||
}
|
||
b("errorCode: 3507 errorMessage: data load failed, errorMsg is " + MintegralAdapter.MINTERGRAL_NO_FILL_EXCEPTION_RETURN_EMPTY, cVar);
|
||
return;
|
||
}
|
||
}
|
||
com.mbridge.msdk.foundation.same.net.f.e a2 = new d(this.m, this.l, this.z, this.u, cVar != null ? cVar.f() : "").a(this.q, this.r, this.n, k(), "", this.C, str, z, this.D);
|
||
if (a2 == null) {
|
||
com.mbridge.msdk.foundation.c.b b6 = com.mbridge.msdk.foundation.c.a.b(880001, "errorCode: 3507 errorMessage: data load failed, errorMsg is Load param is null");
|
||
if (cVar != null) {
|
||
cVar.a(b6);
|
||
}
|
||
b("errorCode: 3507 errorMessage: data load failed, errorMsg is Load param is null", cVar);
|
||
return;
|
||
}
|
||
this.Q = System.currentTimeMillis();
|
||
com.mbridge.msdk.reward.d.b bVar = new com.mbridge.msdk.reward.d.b(this.k);
|
||
com.mbridge.msdk.reward.d.a aVar = new com.mbridge.msdk.reward.d.a() { // from class: com.mbridge.msdk.reward.adapter.c.2
|
||
@Override // com.mbridge.msdk.reward.d.a
|
||
public final void a(CampaignUnit campaignUnit) {
|
||
CampaignEx campaignEx;
|
||
try {
|
||
c.a(c.this, campaignUnit);
|
||
c.b(c.this, campaignUnit);
|
||
if (campaignUnit != null) {
|
||
c.this.b = campaignUnit.getRequestId();
|
||
}
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e.printStackTrace();
|
||
}
|
||
if (c.this.H != null && c.this.H.size() > 0 && (campaignEx = (CampaignEx) c.this.H.get(0)) != null && TextUtils.isEmpty(campaignEx.getNLRid())) {
|
||
c.this.H.clear();
|
||
}
|
||
if (c.this.S != null) {
|
||
c.this.S.clear();
|
||
}
|
||
c.this.e = false;
|
||
c.this.f = false;
|
||
synchronized (c.this.a) {
|
||
try {
|
||
if (c.this.g) {
|
||
c.this.g = false;
|
||
}
|
||
c.this.i = false;
|
||
c.this.h = false;
|
||
c.this.b("exception after load success", cVar);
|
||
c.this.j();
|
||
} catch (Throwable th) {
|
||
throw th;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.d.a
|
||
public final void a(int i, String str2, com.mbridge.msdk.foundation.same.report.d.c cVar2) {
|
||
CampaignEx campaignEx;
|
||
if (i == -1) {
|
||
c.this.J = System.currentTimeMillis();
|
||
}
|
||
if (c.this.H != null && c.this.H.size() > 0 && (campaignEx = (CampaignEx) c.this.H.get(0)) != null && TextUtils.isEmpty(campaignEx.getNLRid())) {
|
||
c.this.H.clear();
|
||
}
|
||
if (c.this.S != null) {
|
||
c.this.S.clear();
|
||
}
|
||
c.this.e = false;
|
||
c.this.f = false;
|
||
synchronized (c.this.a) {
|
||
try {
|
||
if (c.this.g) {
|
||
c.this.g = false;
|
||
}
|
||
} catch (Throwable th) {
|
||
throw th;
|
||
}
|
||
}
|
||
c.a(c.this, cVar2, i);
|
||
c.this.i = false;
|
||
c.this.h = false;
|
||
if (!c.this.P) {
|
||
c.this.a(i, str2, cVar2);
|
||
}
|
||
c.this.j();
|
||
}
|
||
};
|
||
aVar.a(str);
|
||
aVar.setUnitId(this.l);
|
||
aVar.setPlacementId(this.m);
|
||
aVar.setAdType(this.z ? 287 : 94);
|
||
aVar.a(cVar);
|
||
try {
|
||
z2 = com.mbridge.msdk.videocommon.download.h.a().b(this.z ? 287 : 94);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardMVVideoAdapter", "isRewardVideoRefactorForCampaignRequest exception " + e.getMessage());
|
||
}
|
||
z2 = false;
|
||
}
|
||
boolean z3 = z2;
|
||
try {
|
||
if (com.mbridge.msdk.foundation.same.net.e.c.a().a(a2) == null) {
|
||
e eVar = new e();
|
||
eVar.a("hst", h());
|
||
cVar.a("2000125", eVar);
|
||
com.mbridge.msdk.reward.c.a.a.a().a("2000125", cVar);
|
||
}
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e2.printStackTrace();
|
||
}
|
||
}
|
||
if (z3) {
|
||
com.mbridge.msdk.videocommon.download.h.a().a("r_v_c_r_t_c", com.mbridge.msdk.foundation.same.a.p);
|
||
com.mbridge.msdk.videocommon.download.h.a().a("r_v_c_r_t_r", com.mbridge.msdk.foundation.same.a.q);
|
||
com.mbridge.msdk.videocommon.download.h.a().a("r_v_c_r_t_w", com.mbridge.msdk.foundation.same.a.q);
|
||
com.mbridge.msdk.videocommon.download.h.a().a("r_v_c_r_r_c", com.mbridge.msdk.foundation.same.a.r);
|
||
bVar.getCampaign(1, str, a2, aVar, com.mbridge.msdk.foundation.same.c.a(this.p * 1000, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS));
|
||
return;
|
||
}
|
||
String str2 = com.mbridge.msdk.foundation.same.a.a;
|
||
try {
|
||
g a3 = com.mbridge.msdk.c.h.a().a(com.mbridge.msdk.foundation.controller.c.m().k());
|
||
if (a3 != null) {
|
||
a3.f();
|
||
a3.h();
|
||
a3.e();
|
||
a3.g();
|
||
}
|
||
} catch (Exception e3) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardMVVideoAdapter", e3.getMessage());
|
||
}
|
||
}
|
||
bVar.choiceV3OrV5BySetting(1, a2, aVar, str, com.mbridge.msdk.foundation.same.c.a(this.p * 1000, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS));
|
||
} catch (Exception e4) {
|
||
e4.printStackTrace();
|
||
b("Load exception", cVar);
|
||
j();
|
||
}
|
||
}
|
||
|
||
private void a(com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
if (this.O != null) {
|
||
Message obtain = Message.obtain();
|
||
obtain.what = 3;
|
||
if (cVar != null) {
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString("metrics_data_lrid", cVar.f());
|
||
obtain.setData(bundle);
|
||
}
|
||
this.O.sendMessage(obtain);
|
||
}
|
||
}
|
||
|
||
/* JADX INFO: Access modifiers changed from: private */
|
||
public void a(int i, String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
if (this.O != null) {
|
||
if (TextUtils.isEmpty(str)) {
|
||
str = "load fail exception";
|
||
}
|
||
Message obtain = Message.obtain();
|
||
obtain.what = 4;
|
||
obtain.obj = str;
|
||
obtain.arg1 = i;
|
||
if (cVar != null) {
|
||
cVar.c(true);
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString("metrics_data_lrid", cVar.f());
|
||
obtain.setData(bundle);
|
||
}
|
||
if (str.contains("exception")) {
|
||
this.O.sendMessageAtFrontOfQueue(obtain);
|
||
} else {
|
||
this.O.sendMessage(obtain);
|
||
}
|
||
}
|
||
}
|
||
|
||
/* JADX INFO: Access modifiers changed from: private */
|
||
public void b(String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
if (this.O != null) {
|
||
if (TextUtils.isEmpty(str)) {
|
||
str = "load fail exception";
|
||
}
|
||
Message obtain = Message.obtain();
|
||
obtain.what = 4;
|
||
obtain.obj = str;
|
||
if (cVar != null) {
|
||
cVar.c(true);
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString("metrics_data_lrid", cVar.f());
|
||
obtain.setData(bundle);
|
||
}
|
||
if (str.contains("exception")) {
|
||
this.O.sendMessageAtFrontOfQueue(obtain);
|
||
} else {
|
||
this.O.sendMessage(obtain);
|
||
}
|
||
}
|
||
}
|
||
|
||
private void a(com.mbridge.msdk.foundation.db.j jVar, CampaignEx campaignEx) {
|
||
if (jVar == null || jVar.b(campaignEx.getId())) {
|
||
return;
|
||
}
|
||
com.mbridge.msdk.foundation.entity.g gVar = new com.mbridge.msdk.foundation.entity.g();
|
||
gVar.a(campaignEx.getId());
|
||
gVar.b(campaignEx.getFca());
|
||
gVar.c(campaignEx.getFcb());
|
||
gVar.a(0);
|
||
gVar.d(0);
|
||
gVar.a(System.currentTimeMillis());
|
||
jVar.a(gVar);
|
||
}
|
||
|
||
private String h() {
|
||
int I;
|
||
g a2 = com.mbridge.msdk.c.h.a().a(com.mbridge.msdk.foundation.controller.c.m().k());
|
||
if (TextUtils.isEmpty(this.K)) {
|
||
I = a2.as();
|
||
} else {
|
||
I = a2.I();
|
||
}
|
||
return com.mbridge.msdk.foundation.same.net.e.d.f().a(this.K, I);
|
||
}
|
||
|
||
private void a(String str, String str2, List<CampaignEx> list) {
|
||
if (com.mbridge.msdk.videocommon.a.a.a() != null) {
|
||
com.mbridge.msdk.videocommon.a.a.a().a(str, str2, list);
|
||
}
|
||
}
|
||
|
||
private void i() {
|
||
if (com.mbridge.msdk.videocommon.a.a.a() != null) {
|
||
try {
|
||
g b2 = com.mbridge.msdk.c.h.a().b(com.mbridge.msdk.foundation.controller.c.m().k());
|
||
if (b2 == null) {
|
||
com.mbridge.msdk.c.h.a();
|
||
b2 = i.a();
|
||
}
|
||
com.mbridge.msdk.videocommon.a.a.a().a(b2.ad() * 1000, this.l);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
public final void a(CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList, boolean z, boolean z2) {
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar;
|
||
try {
|
||
if (z2) {
|
||
this.S = copyOnWriteArrayList;
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList2 = new CopyOnWriteArrayList<>(copyOnWriteArrayList);
|
||
this.T = copyOnWriteArrayList2;
|
||
cVar = c(copyOnWriteArrayList2);
|
||
} else {
|
||
cVar = this.G.getMetricsData();
|
||
}
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardMVVideoAdapter", e.getMessage());
|
||
}
|
||
cVar = null;
|
||
}
|
||
a(this.G, copyOnWriteArrayList);
|
||
if (copyOnWriteArrayList != null && copyOnWriteArrayList.size() > 0) {
|
||
af.c("RewardMVVideoAdapter", "onload load success size:" + copyOnWriteArrayList.size());
|
||
if (z) {
|
||
e eVar = new e();
|
||
if (z2) {
|
||
eVar.a("cache", 1);
|
||
} else {
|
||
eVar.a("cache", 2);
|
||
}
|
||
if (cVar != null) {
|
||
cVar.a("2000127", eVar);
|
||
cVar.a("2000048", eVar);
|
||
}
|
||
a(cVar);
|
||
}
|
||
CampaignUnit campaignUnit = this.G;
|
||
if (campaignUnit != null) {
|
||
b(campaignUnit.getSessionId());
|
||
}
|
||
b(copyOnWriteArrayList);
|
||
if (copyOnWriteArrayList.size() > 0) {
|
||
af.c("RewardMVVideoAdapter", "#######onload 把广告存在本地 size:" + copyOnWriteArrayList.size());
|
||
a(this.m, this.l, copyOnWriteArrayList);
|
||
}
|
||
CampaignEx campaignEx = copyOnWriteArrayList.get(0);
|
||
this.H = copyOnWriteArrayList;
|
||
a(campaignEx);
|
||
return;
|
||
}
|
||
af.c("RewardMVVideoAdapter", "onload load fail, callback campaign have not video");
|
||
if (TextUtils.isEmpty(this.R)) {
|
||
this.R = "APP ALREADY INSTALLED";
|
||
}
|
||
a(this.R.contains("INSTALL") ? 880021 : 880003, this.R, cVar);
|
||
}
|
||
|
||
private void a(CampaignEx campaignEx) {
|
||
boolean z = !TextUtils.isEmpty(campaignEx.getCMPTEntryUrl());
|
||
int nscpt = campaignEx.getNscpt();
|
||
this.e = false;
|
||
this.f = false;
|
||
synchronized (this.a) {
|
||
try {
|
||
if (this.g) {
|
||
this.g = false;
|
||
}
|
||
} catch (Throwable th) {
|
||
throw th;
|
||
}
|
||
}
|
||
this.i = false;
|
||
this.h = false;
|
||
if (this.A) {
|
||
com.mbridge.msdk.foundation.db.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).a(campaignEx.getBidToken(), campaignEx.getCampaignUnitId(), campaignEx.getEncryptPrice());
|
||
}
|
||
b.m.a.a(this.k, z, nscpt, this.A, this.z ? 287 : 94, this.m, this.l, campaignEx.getRequestId(), this.H, new AnonymousClass3(campaignEx, z, nscpt), new AnonymousClass4(campaignEx, z, nscpt));
|
||
if (z) {
|
||
b.m.a.a(this.k, campaignEx, this.m, this.l, campaignEx.getRequestId(), new AnonymousClass5(campaignEx, z, nscpt));
|
||
}
|
||
}
|
||
|
||
/* renamed from: com.mbridge.msdk.reward.adapter.c$3, reason: invalid class name */
|
||
public class AnonymousClass3 implements b.c {
|
||
com.mbridge.msdk.foundation.same.report.d.c a;
|
||
final /* synthetic */ CampaignEx b;
|
||
final /* synthetic */ boolean c;
|
||
final /* synthetic */ int d;
|
||
|
||
public AnonymousClass3(CampaignEx campaignEx, boolean z, int i) {
|
||
this.b = campaignEx;
|
||
this.c = z;
|
||
this.d = i;
|
||
this.a = com.mbridge.msdk.foundation.same.report.d.d.a().b().get(campaignEx.getLocalRequestId());
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.c
|
||
public final void a(final String str, final String str2, final String str3, final CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList) {
|
||
c.this.e = true;
|
||
if (!this.c) {
|
||
Iterator<CampaignEx> it = copyOnWriteArrayList.iterator();
|
||
while (it.hasNext()) {
|
||
final CampaignEx next = it.next();
|
||
if (next == null || next.getRewardTemplateMode() == null || TextUtils.isEmpty(next.getRewardTemplateMode().e()) || next.getRewardTemplateMode().e().contains(CampaignEx.KEY_IS_CMPT_ENTRY) || c.this.O == null) {
|
||
c cVar = c.this;
|
||
if (cVar.a(cVar.H, this.c, this.d)) {
|
||
c cVar2 = c.this;
|
||
c.a(cVar2, cVar2.l, copyOnWriteArrayList, c.this.U, c.this.A);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t != null && !c.this.h) {
|
||
c.this.h = true;
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar3 = this.a;
|
||
if (cVar3 != null) {
|
||
cVar3.b(c.this.H);
|
||
}
|
||
c.this.t.a(c.this.H, this.a);
|
||
}
|
||
} else {
|
||
c cVar4 = c.this;
|
||
c.a(cVar4, str2, cVar4.S, c.this.A, str3);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t != null && !c.this.i) {
|
||
c.this.i = true;
|
||
com.mbridge.msdk.foundation.c.b b = com.mbridge.msdk.foundation.c.a.b(880015, "errorCode: 3503 errorMessage: have no temp but isReady false");
|
||
if (this.a == null) {
|
||
this.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
this.a.b(c.this.H);
|
||
this.a.a(b);
|
||
c.this.t.a(c.this.H, b, this.a);
|
||
af.a("RewardMVVideoAdapter", "Campaign 下载成功: 非大模板,不存在播放模板,isReay false onVideoLoadFail");
|
||
}
|
||
}
|
||
} else {
|
||
c.this.O.post(new Runnable() { // from class: com.mbridge.msdk.reward.adapter.c.3.1
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
com.mbridge.msdk.reward.adapter.b bVar = b.m.a;
|
||
boolean z = c.this.I;
|
||
Handler handler = c.this.O;
|
||
boolean z2 = c.this.z;
|
||
boolean z3 = c.this.A;
|
||
String e = next.getRewardTemplateMode().e();
|
||
int i = c.this.y;
|
||
AnonymousClass3 anonymousClass3 = AnonymousClass3.this;
|
||
bVar.a(z, handler, z2, z3, null, e, i, anonymousClass3.b, c.this.H, H5DownLoadManager.getInstance().getH5ResAddress(next.getRewardTemplateMode().e()), str, str2, str3, next.getRequestIdNotice(), c.this.u, new b.j() { // from class: com.mbridge.msdk.reward.adapter.c.3.1.1
|
||
@Override // com.mbridge.msdk.reward.adapter.b.j
|
||
public final void a(String str4, String str5, String str6, String str7, String str8, a.C0246a c0246a) {
|
||
c cVar5 = c.this;
|
||
CopyOnWriteArrayList copyOnWriteArrayList2 = cVar5.H;
|
||
AnonymousClass3 anonymousClass32 = AnonymousClass3.this;
|
||
if (cVar5.a(copyOnWriteArrayList2, anonymousClass32.c, anonymousClass32.d)) {
|
||
c cVar6 = c.this;
|
||
String str9 = cVar6.l;
|
||
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
|
||
c.a(cVar6, str9, copyOnWriteArrayList, c.this.U, c.this.A);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.h) {
|
||
return;
|
||
}
|
||
c.this.h = true;
|
||
AnonymousClass3 anonymousClass33 = AnonymousClass3.this;
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar7 = anonymousClass33.a;
|
||
if (cVar7 != null) {
|
||
cVar7.b(c.this.H);
|
||
}
|
||
c.this.t.a(c.this.H, AnonymousClass3.this.a);
|
||
return;
|
||
}
|
||
c cVar8 = c.this;
|
||
c.a(cVar8, str6, cVar8.S, c.this.A, str7);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.i) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880015, "errorCode: 3502 errorMessage: temp preload success but isReady false");
|
||
AnonymousClass3 anonymousClass34 = AnonymousClass3.this;
|
||
if (anonymousClass34.a == null) {
|
||
anonymousClass34.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass3 anonymousClass35 = AnonymousClass3.this;
|
||
anonymousClass35.a.b(c.this.H);
|
||
AnonymousClass3.this.a.a(b2);
|
||
c.this.t.a(c.this.H, b2, AnonymousClass3.this.a);
|
||
af.a("RewardMVVideoAdapter", "Campaign 下载成功: 非大模板,播放模板预加载成功,isReay false onVideoLoadFail");
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.j
|
||
public final void a(String str4, String str5, String str6, a.C0246a c0246a, com.mbridge.msdk.foundation.c.b bVar2) {
|
||
if (bVar2 != null) {
|
||
bVar2.a("his_reason", "preload template failed is tpl :" + AnonymousClass3.this.c);
|
||
}
|
||
if (AnonymousClass3.this.b.getRsIgnoreCheckRule() != null && AnonymousClass3.this.b.getRsIgnoreCheckRule().size() > 0 && AnonymousClass3.this.b.getRsIgnoreCheckRule().contains(1)) {
|
||
af.c("RewardMVVideoAdapter", "template download fail but hit ignoreCheckRule");
|
||
return;
|
||
}
|
||
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
|
||
c cVar5 = c.this;
|
||
c.a(cVar5, str2, cVar5.S, c.this.A, str5);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.i) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
AnonymousClass3 anonymousClass32 = AnonymousClass3.this;
|
||
if (anonymousClass32.a == null) {
|
||
anonymousClass32.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass3 anonymousClass33 = AnonymousClass3.this;
|
||
anonymousClass33.a.b(c.this.H);
|
||
AnonymousClass3.this.a.a(bVar2);
|
||
c.this.t.a(c.this.S, bVar2, AnonymousClass3.this.a);
|
||
af.a("RewardMVVideoAdapter", "Campaign 下载失败: 非大模板,播放模板预加载失败 onVideoLoadFail");
|
||
}
|
||
});
|
||
}
|
||
});
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
if (!c.this.f || c.this.g || c.this.O == null) {
|
||
return;
|
||
}
|
||
synchronized (c.this.a) {
|
||
try {
|
||
if (c.this.g) {
|
||
return;
|
||
}
|
||
c.this.g = true;
|
||
c.this.O.post(new Runnable() { // from class: com.mbridge.msdk.reward.adapter.c.3.2
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
com.mbridge.msdk.reward.adapter.b bVar = b.m.a;
|
||
boolean z = c.this.I;
|
||
Handler handler = c.this.O;
|
||
boolean z2 = c.this.z;
|
||
boolean z3 = c.this.A;
|
||
String str4 = str3;
|
||
String requestIdNotice = AnonymousClass3.this.b.getRequestIdNotice();
|
||
String str5 = c.this.m;
|
||
String str6 = str2;
|
||
String cMPTEntryUrl = AnonymousClass3.this.b.getCMPTEntryUrl();
|
||
int i = c.this.y;
|
||
AnonymousClass3 anonymousClass3 = AnonymousClass3.this;
|
||
bVar.a(z, handler, z2, z3, str4, requestIdNotice, str5, str6, cMPTEntryUrl, i, anonymousClass3.b, c.this.H, H5DownLoadManager.getInstance().getH5ResAddress(AnonymousClass3.this.b.getCMPTEntryUrl()), str2, c.this.u, new b.j() { // from class: com.mbridge.msdk.reward.adapter.c.3.2.1
|
||
@Override // com.mbridge.msdk.reward.adapter.b.j
|
||
public final void a(String str7, String str8, String str9, String str10, String str11, a.C0246a c0246a) {
|
||
c cVar5 = c.this;
|
||
CopyOnWriteArrayList copyOnWriteArrayList2 = cVar5.H;
|
||
AnonymousClass3 anonymousClass32 = AnonymousClass3.this;
|
||
if (cVar5.a(copyOnWriteArrayList2, anonymousClass32.c, anonymousClass32.d)) {
|
||
c cVar6 = c.this;
|
||
String str12 = cVar6.l;
|
||
AnonymousClass2 anonymousClass2 = AnonymousClass2.this;
|
||
c.a(cVar6, str12, copyOnWriteArrayList, c.this.U, c.this.A);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.h) {
|
||
return;
|
||
}
|
||
c.this.h = true;
|
||
AnonymousClass3 anonymousClass33 = AnonymousClass3.this;
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar7 = anonymousClass33.a;
|
||
if (cVar7 != null) {
|
||
cVar7.b(c.this.H);
|
||
}
|
||
c.this.t.a(c.this.H, AnonymousClass3.this.a);
|
||
return;
|
||
}
|
||
c cVar8 = c.this;
|
||
c.a(cVar8, str9, cVar8.S, c.this.A, str10);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.i) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880015, "errorCode: 3505 errorMessage: tpl temp preload success but isReady false");
|
||
AnonymousClass3 anonymousClass34 = AnonymousClass3.this;
|
||
if (anonymousClass34.a == null) {
|
||
anonymousClass34.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass3 anonymousClass35 = AnonymousClass3.this;
|
||
anonymousClass35.a.b(c.this.H);
|
||
AnonymousClass3.this.a.a(b2);
|
||
c.this.t.a(c.this.S, b2, AnonymousClass3.this.a);
|
||
af.a("RewardMVVideoAdapter", "Campaign 下载成功: 大模板预加载成功,isReady false onVideoLoadFail");
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.j
|
||
public final void a(String str7, String str8, String str9, a.C0246a c0246a, com.mbridge.msdk.foundation.c.b bVar2) {
|
||
if (bVar2 != null) {
|
||
bVar2.a("his_reason", "errorCode: 3303 errorMessage: tpl temp preload failed");
|
||
}
|
||
if (AnonymousClass3.this.b.getRsIgnoreCheckRule() != null && AnonymousClass3.this.b.getRsIgnoreCheckRule().size() > 0 && AnonymousClass3.this.b.getRsIgnoreCheckRule().contains(3)) {
|
||
af.c("RewardMVVideoAdapter", "template download fail but hit ignoreCheckRule");
|
||
return;
|
||
}
|
||
AnonymousClass2 anonymousClass2 = AnonymousClass2.this;
|
||
c cVar5 = c.this;
|
||
c.a(cVar5, str2, cVar5.S, c.this.A, str8);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.i) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
AnonymousClass3 anonymousClass32 = AnonymousClass3.this;
|
||
if (anonymousClass32.a == null) {
|
||
anonymousClass32.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass3 anonymousClass33 = AnonymousClass3.this;
|
||
anonymousClass33.a.b(c.this.H);
|
||
AnonymousClass3.this.a.a(bVar2);
|
||
c.this.t.a(c.this.S, bVar2, AnonymousClass3.this.a);
|
||
af.a("RewardMVVideoAdapter", "Campaign 下载成功: 大模板预加载失败 onVideoLoadFail");
|
||
}
|
||
}, false);
|
||
}
|
||
});
|
||
} catch (Throwable th) {
|
||
throw th;
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.c
|
||
public final void a(final CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList, final com.mbridge.msdk.foundation.c.b bVar) {
|
||
c.this.e = false;
|
||
if (c.this.t == null || c.this.O == null) {
|
||
return;
|
||
}
|
||
c.this.O.post(new Runnable() { // from class: com.mbridge.msdk.reward.adapter.c.3.3
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
c cVar = c.this;
|
||
c.a(cVar, cVar.l, copyOnWriteArrayList, c.this.A, "");
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.i || c.this.t == null) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
AnonymousClass3 anonymousClass3 = AnonymousClass3.this;
|
||
if (anonymousClass3.a == null) {
|
||
anonymousClass3.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass3 anonymousClass32 = AnonymousClass3.this;
|
||
anonymousClass32.a.b(c.this.H);
|
||
com.mbridge.msdk.foundation.c.b bVar2 = bVar;
|
||
if (bVar2 != null) {
|
||
bVar2.a("errorCode: 3201 errorMessage: campaign resource download failed");
|
||
}
|
||
AnonymousClass3.this.a.a(bVar);
|
||
c.this.t.a(copyOnWriteArrayList, bVar, AnonymousClass3.this.a);
|
||
af.a("RewardMVVideoAdapter", "Campaign 下载失败:onVideoLoadFail");
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
/* renamed from: com.mbridge.msdk.reward.adapter.c$4, reason: invalid class name */
|
||
public class AnonymousClass4 implements b.i {
|
||
com.mbridge.msdk.foundation.same.report.d.c a;
|
||
final /* synthetic */ CampaignEx b;
|
||
final /* synthetic */ boolean c;
|
||
final /* synthetic */ int d;
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.i
|
||
public final void a(String str, String str2, String str3, String str4) {
|
||
}
|
||
|
||
public AnonymousClass4(CampaignEx campaignEx, boolean z, int i) {
|
||
this.b = campaignEx;
|
||
this.c = z;
|
||
this.d = i;
|
||
this.a = com.mbridge.msdk.foundation.same.report.d.d.a().b().get(campaignEx.getLocalRequestId());
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.i
|
||
public final void a(String str, final String str2, final com.mbridge.msdk.foundation.c.b bVar) {
|
||
af.a("RewardMVVideoAdapter", "template 下载失败: ");
|
||
if (bVar != null) {
|
||
bVar.a("errorCode: 3202 errorMessage: temp resource download failed");
|
||
}
|
||
if (!this.c && c.this.t != null && c.this.O != null) {
|
||
af.a("RewardMVVideoAdapter", "播放模板下载失败,非大模板");
|
||
if (this.b.getRsIgnoreCheckRule() == null || this.b.getRsIgnoreCheckRule().size() <= 0 || !this.b.getRsIgnoreCheckRule().contains(1)) {
|
||
c.this.O.post(new Runnable() { // from class: com.mbridge.msdk.reward.adapter.c.4.1
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
c cVar = c.this;
|
||
c.a(cVar, cVar.l, c.this.S, c.this.A, str2);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.i || c.this.t == null) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
com.mbridge.msdk.foundation.c.b bVar2 = bVar;
|
||
if (bVar2 != null) {
|
||
bVar2.a("errorCode: 3202 errorMessage: temp resource download failed");
|
||
}
|
||
AnonymousClass4 anonymousClass4 = AnonymousClass4.this;
|
||
if (anonymousClass4.a == null) {
|
||
anonymousClass4.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass4 anonymousClass42 = AnonymousClass4.this;
|
||
anonymousClass42.a.b(c.this.H);
|
||
AnonymousClass4.this.a.a(bVar);
|
||
c.this.t.a(c.this.S, bVar, AnonymousClass4.this.a);
|
||
af.a("RewardMVVideoAdapter", "播放模板下载失败,非大模板 onVideoLoadFail");
|
||
}
|
||
});
|
||
return;
|
||
} else {
|
||
af.c("RewardMVVideoAdapter", "template download fail but hit ignoreCheckRule");
|
||
return;
|
||
}
|
||
}
|
||
if (this.d == 1) {
|
||
if (this.b.getRsIgnoreCheckRule() != null && this.b.getRsIgnoreCheckRule().size() > 0) {
|
||
if (this.b.getRsIgnoreCheckRule().contains(3)) {
|
||
af.c("RewardMVVideoAdapter", "tpl download fail but hit ignoreCheckRule");
|
||
return;
|
||
} else if (this.b.getCMPTEntryUrl().equals(this.b.getendcard_url()) && this.b.getRsIgnoreCheckRule().contains(2)) {
|
||
af.c("RewardMVVideoAdapter", "endcard download fail but hit ignoreCheckRule at 3203");
|
||
return;
|
||
}
|
||
}
|
||
if (c.this.t == null || c.this.O == null) {
|
||
return;
|
||
}
|
||
c.this.O.post(new Runnable() { // from class: com.mbridge.msdk.reward.adapter.c.4.2
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
c cVar = c.this;
|
||
c.a(cVar, cVar.l, c.this.S, c.this.A, str2);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.i || c.this.t == null) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
com.mbridge.msdk.foundation.c.b bVar2 = bVar;
|
||
if (bVar2 != null) {
|
||
bVar2.a("errorCode: 3203 errorMessage: tpl temp resource download failed");
|
||
}
|
||
AnonymousClass4 anonymousClass4 = AnonymousClass4.this;
|
||
if (anonymousClass4.a == null) {
|
||
anonymousClass4.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass4 anonymousClass42 = AnonymousClass4.this;
|
||
anonymousClass42.a.b(c.this.H);
|
||
AnonymousClass4.this.a.a(bVar);
|
||
c.this.t.a(c.this.S, bVar, AnonymousClass4.this.a);
|
||
af.a("RewardMVVideoAdapter", "播放模板下载失败,大模板,nscpt 1 onVideoLoadFail");
|
||
}
|
||
});
|
||
}
|
||
}
|
||
}
|
||
|
||
/* renamed from: com.mbridge.msdk.reward.adapter.c$5, reason: invalid class name */
|
||
public class AnonymousClass5 implements b.i {
|
||
com.mbridge.msdk.foundation.same.report.d.c a;
|
||
final /* synthetic */ CampaignEx b;
|
||
final /* synthetic */ boolean c;
|
||
final /* synthetic */ int d;
|
||
|
||
public AnonymousClass5(CampaignEx campaignEx, boolean z, int i) {
|
||
this.b = campaignEx;
|
||
this.c = z;
|
||
this.d = i;
|
||
this.a = com.mbridge.msdk.foundation.same.report.d.d.a().b().get(campaignEx.getLocalRequestId());
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.i
|
||
public final void a(final String str, final String str2, final String str3, String str4) {
|
||
af.a("RewardMVVideoAdapter", "大模板业务,大模板下载成功");
|
||
c.this.f = true;
|
||
if (!c.this.e || c.this.g || c.this.O == null) {
|
||
return;
|
||
}
|
||
synchronized (c.this.a) {
|
||
try {
|
||
if (c.this.g) {
|
||
return;
|
||
}
|
||
c.this.g = true;
|
||
c.this.O.post(new Runnable() { // from class: com.mbridge.msdk.reward.adapter.c.5.1
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
com.mbridge.msdk.reward.adapter.b bVar = b.m.a;
|
||
boolean z = c.this.I;
|
||
Handler handler = c.this.O;
|
||
boolean z2 = c.this.z;
|
||
boolean z3 = c.this.A;
|
||
String str5 = str3;
|
||
String requestIdNotice = AnonymousClass5.this.b.getRequestIdNotice();
|
||
String str6 = str;
|
||
String str7 = str2;
|
||
String cMPTEntryUrl = AnonymousClass5.this.b.getCMPTEntryUrl();
|
||
int i = c.this.y;
|
||
AnonymousClass5 anonymousClass5 = AnonymousClass5.this;
|
||
bVar.a(z, handler, z2, z3, str5, requestIdNotice, str6, str7, cMPTEntryUrl, i, anonymousClass5.b, c.this.H, H5DownLoadManager.getInstance().getH5ResAddress(AnonymousClass5.this.b.getCMPTEntryUrl()), str2, c.this.u, new b.j() { // from class: com.mbridge.msdk.reward.adapter.c.5.1.1
|
||
@Override // com.mbridge.msdk.reward.adapter.b.j
|
||
public final void a(String str8, String str9, String str10, String str11, String str12, a.C0246a c0246a) {
|
||
af.a("HBOPTIMIZE", "模板加载成功 requestId " + str11);
|
||
c cVar = c.this;
|
||
CopyOnWriteArrayList copyOnWriteArrayList = cVar.H;
|
||
AnonymousClass5 anonymousClass52 = AnonymousClass5.this;
|
||
if (cVar.a(copyOnWriteArrayList, anonymousClass52.c, anonymousClass52.d)) {
|
||
c cVar2 = c.this;
|
||
c.a(cVar2, cVar2.l, c.this.S, c.this.U, c.this.A);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.h) {
|
||
return;
|
||
}
|
||
c.this.h = true;
|
||
AnonymousClass5 anonymousClass53 = AnonymousClass5.this;
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar3 = anonymousClass53.a;
|
||
if (cVar3 != null) {
|
||
cVar3.b(c.this.H);
|
||
}
|
||
c.this.t.a(c.this.H, AnonymousClass5.this.a);
|
||
return;
|
||
}
|
||
c cVar4 = c.this;
|
||
c.a(cVar4, str10, cVar4.S, c.this.A, str3);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.i) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
com.mbridge.msdk.foundation.c.b b = com.mbridge.msdk.foundation.c.a.b(880008, "errorCode: 3505 errorMessage: tpl temp preload success but isReady false");
|
||
AnonymousClass5 anonymousClass54 = AnonymousClass5.this;
|
||
if (anonymousClass54.a == null) {
|
||
anonymousClass54.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass5 anonymousClass55 = AnonymousClass5.this;
|
||
anonymousClass55.a.b(c.this.H);
|
||
AnonymousClass5.this.a.a(b);
|
||
c.this.t.a(c.this.S, b, AnonymousClass5.this.a);
|
||
af.a("RewardMVVideoAdapter", "大模板业务,大模板预加载成功 isReady false onVideoLoadFail");
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.j
|
||
public final void a(String str8, String str9, String str10, a.C0246a c0246a, com.mbridge.msdk.foundation.c.b bVar2) {
|
||
af.a("RewardMVVideoAdapter", "大模板业务,大模板预加载失败");
|
||
af.b("HBOPTIMIZE", "模板加载失败 requestId " + str9);
|
||
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
|
||
c cVar = c.this;
|
||
c.a(cVar, str2, cVar.S, c.this.A, str9);
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.i) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
AnonymousClass5 anonymousClass52 = AnonymousClass5.this;
|
||
if (anonymousClass52.a == null) {
|
||
anonymousClass52.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass5 anonymousClass53 = AnonymousClass5.this;
|
||
anonymousClass53.a.b(c.this.H);
|
||
AnonymousClass5.this.a.a(bVar2);
|
||
c.this.t.a(c.this.S, bVar2, AnonymousClass5.this.a);
|
||
af.a("RewardMVVideoAdapter", "大模板业务,大模板预加载失败 onVideoLoadFail");
|
||
}
|
||
}, false);
|
||
}
|
||
});
|
||
} catch (Throwable th) {
|
||
throw th;
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.i
|
||
public final void a(String str, String str2, com.mbridge.msdk.foundation.c.b bVar) {
|
||
af.a("RewardMVVideoAdapter", "大模板业务,大模板下载失败");
|
||
if (this.b.getRsIgnoreCheckRule() != null && this.b.getRsIgnoreCheckRule().size() > 0) {
|
||
if (this.b.getRsIgnoreCheckRule().contains(3)) {
|
||
af.c("RewardMVVideoAdapter", "tpl download fail but hit ignoreCheckRule");
|
||
return;
|
||
} else if (this.b.getCMPTEntryUrl().equals(this.b.getendcard_url()) && this.b.getRsIgnoreCheckRule().contains(2)) {
|
||
af.c("RewardMVVideoAdapter", "endcard download fail but hit ignoreCheckRule at 3203");
|
||
return;
|
||
}
|
||
}
|
||
c cVar = c.this;
|
||
c.a(cVar, cVar.l, c.this.S, c.this.A, str2);
|
||
c.this.f = false;
|
||
if (c.this.O != null) {
|
||
c.this.O.removeMessages(5);
|
||
}
|
||
if (c.this.t == null || c.this.i) {
|
||
return;
|
||
}
|
||
c.this.i = true;
|
||
if (bVar != null) {
|
||
bVar.a("errorCode: 3203 errorMessage: tpl temp resource download failed");
|
||
}
|
||
if (this.a == null) {
|
||
this.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
this.a.b(c.this.H);
|
||
this.a.a(bVar);
|
||
c.this.t.a(c.this.S, bVar, this.a);
|
||
af.a("RewardMVVideoAdapter", "大模板业务,大模板下载失败 onVideoLoadFail");
|
||
}
|
||
}
|
||
|
||
public final void f(boolean z) {
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList;
|
||
if (z || (copyOnWriteArrayList = this.H) == null || copyOnWriteArrayList.size() <= 0) {
|
||
return;
|
||
}
|
||
com.mbridge.msdk.videocommon.a.a.a().a(this.l, this.H);
|
||
}
|
||
|
||
public final void g(boolean z) {
|
||
if (z) {
|
||
List<CampaignEx> list = this.U;
|
||
if (list == null || list.size() <= 0) {
|
||
return;
|
||
}
|
||
for (CampaignEx campaignEx : this.U) {
|
||
if (campaignEx != null) {
|
||
campaignEx.setLoadTimeoutState(0);
|
||
if (campaignEx.getRewardTemplateMode() != null && !TextUtils.isEmpty(campaignEx.getRewardTemplateMode().e())) {
|
||
ResDownloadCheckManager.getInstance().setTemplatePreLoadDone(this.l + "_" + campaignEx.getRequestId() + "_" + campaignEx.getRewardTemplateMode().e(), false);
|
||
}
|
||
}
|
||
}
|
||
com.mbridge.msdk.videocommon.a.a.a().a(this.l, this.U, "load_timeout", 0);
|
||
return;
|
||
}
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList = this.H;
|
||
if (copyOnWriteArrayList == null || copyOnWriteArrayList.size() <= 0) {
|
||
return;
|
||
}
|
||
Iterator<CampaignEx> it = this.H.iterator();
|
||
while (it.hasNext()) {
|
||
CampaignEx next = it.next();
|
||
if (next != null) {
|
||
next.setLoadTimeoutState(0);
|
||
if (next.getRewardTemplateMode() != null && !TextUtils.isEmpty(next.getRewardTemplateMode().e())) {
|
||
ResDownloadCheckManager.getInstance().setTemplatePreLoadDone(this.l + "_" + next.getRequestId() + "_" + next.getRewardTemplateMode().e(), false);
|
||
}
|
||
}
|
||
}
|
||
com.mbridge.msdk.videocommon.a.a.a().a(this.l, this.H, "load_timeout", 0);
|
||
}
|
||
|
||
public final boolean h(boolean z) {
|
||
if (z) {
|
||
List<CampaignEx> list = this.U;
|
||
if (list == null || list.size() <= 0) {
|
||
return false;
|
||
}
|
||
for (CampaignEx campaignEx : this.U) {
|
||
if (campaignEx != null) {
|
||
campaignEx.setLoadTimeoutState(1);
|
||
if (campaignEx.getRewardTemplateMode() != null && !TextUtils.isEmpty(campaignEx.getRewardTemplateMode().e())) {
|
||
ResDownloadCheckManager.getInstance().setTemplatePreLoadDone(this.l + "_" + campaignEx.getRequestId() + "_" + campaignEx.getRewardTemplateMode().e(), true);
|
||
}
|
||
}
|
||
}
|
||
com.mbridge.msdk.videocommon.a.a.a().a(this.l, this.U, "load_timeout", 1);
|
||
return true;
|
||
}
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList = this.H;
|
||
if (copyOnWriteArrayList == null || copyOnWriteArrayList.size() <= 0) {
|
||
return false;
|
||
}
|
||
Iterator<CampaignEx> it = this.H.iterator();
|
||
while (it.hasNext()) {
|
||
CampaignEx next = it.next();
|
||
if (next != null) {
|
||
next.setLoadTimeoutState(1);
|
||
if (next.getRewardTemplateMode() != null && !TextUtils.isEmpty(next.getRewardTemplateMode().e())) {
|
||
ResDownloadCheckManager.getInstance().setTemplatePreLoadDone(this.l + "_" + next.getRequestId() + "_" + next.getRewardTemplateMode().e(), true);
|
||
}
|
||
}
|
||
}
|
||
com.mbridge.msdk.videocommon.a.a.a().a(this.l, this.H, "load_timeout", 1);
|
||
return true;
|
||
}
|
||
|
||
/* JADX WARN: Removed duplicated region for block: B:16:0x006a A[Catch: Exception -> 0x002e, TryCatch #0 {Exception -> 0x002e, blocks: (B:50:0x0004, B:52:0x000a, B:54:0x0013, B:56:0x0029, B:4:0x0034, B:6:0x003a, B:7:0x0048, B:9:0x004e, B:11:0x0057, B:13:0x005d, B:14:0x0064, B:16:0x006a, B:19:0x0072, B:25:0x0090, B:27:0x0096, B:28:0x009a, B:30:0x00a0, B:33:0x00a8, B:38:0x00b4), top: B:49:0x0004 }] */
|
||
/* JADX WARN: Removed duplicated region for block: B:30:0x00a0 A[Catch: Exception -> 0x002e, TryCatch #0 {Exception -> 0x002e, blocks: (B:50:0x0004, B:52:0x000a, B:54:0x0013, B:56:0x0029, B:4:0x0034, B:6:0x003a, B:7:0x0048, B:9:0x004e, B:11:0x0057, B:13:0x005d, B:14:0x0064, B:16:0x006a, B:19:0x0072, B:25:0x0090, B:27:0x0096, B:28:0x009a, B:30:0x00a0, B:33:0x00a8, B:38:0x00b4), top: B:49:0x0004 }] */
|
||
/* JADX WARN: Removed duplicated region for block: B:6:0x003a A[Catch: Exception -> 0x002e, TryCatch #0 {Exception -> 0x002e, blocks: (B:50:0x0004, B:52:0x000a, B:54:0x0013, B:56:0x0029, B:4:0x0034, B:6:0x003a, B:7:0x0048, B:9:0x004e, B:11:0x0057, B:13:0x005d, B:14:0x0064, B:16:0x006a, B:19:0x0072, B:25:0x0090, B:27:0x0096, B:28:0x009a, B:30:0x00a0, B:33:0x00a8, B:38:0x00b4), top: B:49:0x0004 }] */
|
||
/* JADX WARN: Removed duplicated region for block: B:9:0x004e A[Catch: Exception -> 0x002e, TryCatch #0 {Exception -> 0x002e, blocks: (B:50:0x0004, B:52:0x000a, B:54:0x0013, B:56:0x0029, B:4:0x0034, B:6:0x003a, B:7:0x0048, B:9:0x004e, B:11:0x0057, B:13:0x005d, B:14:0x0064, B:16:0x006a, B:19:0x0072, B:25:0x0090, B:27:0x0096, B:28:0x009a, B:30:0x00a0, B:33:0x00a8, B:38:0x00b4), top: B:49:0x0004 }] */
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
private void a(java.lang.String r11, java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r12, java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r13) {
|
||
/*
|
||
r10 = this;
|
||
java.lang.String r0 = ""
|
||
if (r12 == 0) goto L31
|
||
int r1 = r12.size() // Catch: java.lang.Exception -> L2e
|
||
if (r1 <= 0) goto L31
|
||
r1 = 0
|
||
java.lang.Object r1 = r12.get(r1) // Catch: java.lang.Exception -> L2e
|
||
com.mbridge.msdk.foundation.entity.CampaignEx r1 = (com.mbridge.msdk.foundation.entity.CampaignEx) r1 // Catch: java.lang.Exception -> L2e
|
||
if (r1 == 0) goto L31
|
||
java.lang.String r2 = r1.getRequestId() // Catch: java.lang.Exception -> L2e
|
||
int r3 = r1.getVcn() // Catch: java.lang.Exception -> L2e
|
||
java.lang.String r4 = r1.getBidToken() // Catch: java.lang.Exception -> L2e
|
||
java.lang.String r5 = r1.getNLRid() // Catch: java.lang.Exception -> L2e
|
||
boolean r5 = android.text.TextUtils.isEmpty(r5) // Catch: java.lang.Exception -> L2e
|
||
if (r5 == 0) goto L34
|
||
java.lang.String r0 = r1.getLocalRequestId() // Catch: java.lang.Exception -> L2e
|
||
goto L34
|
||
L2e:
|
||
r11 = move-exception
|
||
goto Lc7
|
||
L31:
|
||
r3 = 1
|
||
r2 = r0
|
||
r4 = r2
|
||
L34:
|
||
com.mbridge.msdk.videocommon.a.a r1 = com.mbridge.msdk.videocommon.a.a.a() // Catch: java.lang.Exception -> L2e
|
||
if (r1 == 0) goto L48
|
||
com.mbridge.msdk.videocommon.a.a r1 = com.mbridge.msdk.videocommon.a.a.a() // Catch: java.lang.Exception -> L2e
|
||
r1.b(r11, r0) // Catch: java.lang.Exception -> L2e
|
||
com.mbridge.msdk.videocommon.a.a r0 = com.mbridge.msdk.videocommon.a.a.a() // Catch: java.lang.Exception -> L2e
|
||
r0.b(r11) // Catch: java.lang.Exception -> L2e
|
||
L48:
|
||
com.mbridge.msdk.videocommon.a.a r0 = com.mbridge.msdk.videocommon.a.a.a() // Catch: java.lang.Exception -> L2e
|
||
if (r0 == 0) goto L55
|
||
com.mbridge.msdk.videocommon.a.a r0 = com.mbridge.msdk.videocommon.a.a.a() // Catch: java.lang.Exception -> L2e
|
||
r0.b(r11, r3) // Catch: java.lang.Exception -> L2e
|
||
L55:
|
||
if (r12 == 0) goto L8e
|
||
int r0 = r12.size() // Catch: java.lang.Exception -> L2e
|
||
if (r0 <= 0) goto L8e
|
||
com.mbridge.msdk.reward.b.a.a(r2, r4) // Catch: java.lang.Exception -> L2e
|
||
java.util.Iterator r12 = r12.iterator() // Catch: java.lang.Exception -> L2e
|
||
L64:
|
||
boolean r0 = r12.hasNext() // Catch: java.lang.Exception -> L2e
|
||
if (r0 == 0) goto L8e
|
||
java.lang.Object r0 = r12.next() // Catch: java.lang.Exception -> L2e
|
||
com.mbridge.msdk.foundation.entity.CampaignEx r0 = (com.mbridge.msdk.foundation.entity.CampaignEx) r0 // Catch: java.lang.Exception -> L2e
|
||
if (r0 == 0) goto L64
|
||
java.lang.String r1 = r0.getCampaignUnitId() // Catch: java.lang.Exception -> L2e
|
||
java.lang.String r2 = r0.getRequestId() // Catch: java.lang.Exception -> L2e
|
||
java.lang.String r3 = r0.getId() // Catch: java.lang.Exception -> L2e
|
||
long r4 = r0.getPlct() // Catch: java.lang.Exception -> L2e
|
||
long r6 = r0.getPlctb() // Catch: java.lang.Exception -> L2e
|
||
long r8 = r0.getTimestamp() // Catch: java.lang.Exception -> L2e
|
||
com.mbridge.msdk.foundation.same.a.b.a(r1, r2, r3, r4, r6, r8) // Catch: java.lang.Exception -> L2e
|
||
goto L64
|
||
L8e:
|
||
if (r13 == 0) goto Lb4
|
||
int r12 = r13.size() // Catch: java.lang.Exception -> L2e
|
||
if (r12 <= 0) goto Lb4
|
||
java.util.Iterator r12 = r13.iterator() // Catch: java.lang.Exception -> L2e
|
||
L9a:
|
||
boolean r13 = r12.hasNext() // Catch: java.lang.Exception -> L2e
|
||
if (r13 == 0) goto Lb4
|
||
java.lang.Object r13 = r12.next() // Catch: java.lang.Exception -> L2e
|
||
com.mbridge.msdk.foundation.entity.CampaignEx r13 = (com.mbridge.msdk.foundation.entity.CampaignEx) r13 // Catch: java.lang.Exception -> L2e
|
||
if (r13 == 0) goto L9a
|
||
java.lang.String r0 = r13.getCampaignUnitId() // Catch: java.lang.Exception -> L2e
|
||
java.lang.String r13 = r13.getRequestId() // Catch: java.lang.Exception -> L2e
|
||
com.mbridge.msdk.foundation.same.a.b.c(r0, r13) // Catch: java.lang.Exception -> L2e
|
||
goto L9a
|
||
Lb4:
|
||
com.mbridge.msdk.foundation.same.a.b.c(r11) // Catch: java.lang.Exception -> L2e
|
||
com.mbridge.msdk.foundation.controller.c r11 = com.mbridge.msdk.foundation.controller.c.m() // Catch: java.lang.Exception -> L2e
|
||
android.content.Context r11 = r11.c() // Catch: java.lang.Exception -> L2e
|
||
com.mbridge.msdk.foundation.db.b r11 = com.mbridge.msdk.foundation.db.b.a(r11) // Catch: java.lang.Exception -> L2e
|
||
r11.a() // Catch: java.lang.Exception -> L2e
|
||
goto Lce
|
||
Lc7:
|
||
boolean r12 = com.mbridge.msdk.MBridgeConstans.DEBUG
|
||
if (r12 == 0) goto Lce
|
||
r11.printStackTrace()
|
||
Lce:
|
||
return
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.adapter.c.a(java.lang.String, java.util.List, java.util.List):void");
|
||
}
|
||
|
||
/* JADX WARN: Code restructure failed: missing block: B:147:0x01a8, code lost:
|
||
|
||
if (com.mbridge.msdk.foundation.tools.ap.a(r13.getVideoUrlEncode()) != false) goto L96;
|
||
*/
|
||
/* JADX WARN: Code restructure failed: missing block: B:158:0x0204, code lost:
|
||
|
||
if (com.mbridge.msdk.MBridgeConstans.DEBUG == false) goto L132;
|
||
*/
|
||
/* JADX WARN: Code restructure failed: missing block: B:74:0x021a, code lost:
|
||
|
||
if (com.mbridge.msdk.MBridgeConstans.DEBUG == false) goto L132;
|
||
*/
|
||
/* JADX WARN: Code restructure failed: missing block: B:75:0x0206, code lost:
|
||
|
||
com.mbridge.msdk.foundation.tools.af.b("RewardMVVideoAdapter", r13.getMessage());
|
||
*/
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
private java.util.concurrent.CopyOnWriteArrayList<com.mbridge.msdk.foundation.entity.CampaignEx> a(com.mbridge.msdk.foundation.entity.CampaignUnit r13) {
|
||
/*
|
||
Method dump skipped, instructions count: 561
|
||
To view this dump add '--comments-level debug' option
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.adapter.c.a(com.mbridge.msdk.foundation.entity.CampaignUnit):java.util.concurrent.CopyOnWriteArrayList");
|
||
}
|
||
|
||
private void a(final CampaignUnit campaignUnit, List<CampaignEx> list) {
|
||
com.mbridge.msdk.foundation.same.f.a.b().execute(new Runnable() { // from class: com.mbridge.msdk.reward.adapter.c.7
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
com.mbridge.msdk.foundation.db.j.a(com.mbridge.msdk.foundation.db.g.a(c.this.k)).a();
|
||
CampaignUnit campaignUnit2 = campaignUnit;
|
||
if (campaignUnit2 == null || campaignUnit2.getAds() == null || campaignUnit.getAds().size() <= 0) {
|
||
return;
|
||
}
|
||
c.a(c.this, campaignUnit.getAds());
|
||
}
|
||
});
|
||
}
|
||
|
||
private void b(List<CampaignEx> list) {
|
||
if (list != null) {
|
||
try {
|
||
if (list.size() > 0) {
|
||
this.n += list.size();
|
||
}
|
||
} catch (Exception e) {
|
||
e.printStackTrace();
|
||
return;
|
||
}
|
||
}
|
||
com.mbridge.msdk.videocommon.d.c cVar = this.u;
|
||
if (cVar == null || this.n > cVar.v()) {
|
||
this.n = 0;
|
||
}
|
||
if (ap.b(this.l)) {
|
||
com.mbridge.msdk.reward.b.a.a(this.l, this.n);
|
||
}
|
||
}
|
||
|
||
/* JADX INFO: Access modifiers changed from: private */
|
||
public void j() {
|
||
try {
|
||
if (ap.b(this.l)) {
|
||
com.mbridge.msdk.reward.b.a.a(this.l, 0);
|
||
}
|
||
} catch (Exception e) {
|
||
e.printStackTrace();
|
||
}
|
||
}
|
||
|
||
private String k() {
|
||
try {
|
||
return ap.b(com.mbridge.msdk.reward.b.a.d) ? com.mbridge.msdk.reward.b.a.d : "";
|
||
} catch (Exception e) {
|
||
e.printStackTrace();
|
||
return "";
|
||
}
|
||
}
|
||
|
||
private void b(String str) {
|
||
if (ap.b(str)) {
|
||
com.mbridge.msdk.reward.b.a.d = str;
|
||
}
|
||
}
|
||
|
||
private void l() {
|
||
try {
|
||
Map<String, Long> map = com.mbridge.msdk.foundation.same.a.b.k;
|
||
if (map == null || map.size() <= 0) {
|
||
return;
|
||
}
|
||
com.mbridge.msdk.foundation.same.a.b.k.clear();
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
|
||
private void m() {
|
||
try {
|
||
com.mbridge.msdk.foundation.db.i.a(com.mbridge.msdk.foundation.db.g.a(this.k)).a(this.l);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
|
||
private boolean b(CampaignEx campaignEx) {
|
||
if (campaignEx == null) {
|
||
return false;
|
||
}
|
||
try {
|
||
return campaignEx.getPlayable_ads_without_video() == 2;
|
||
} catch (Throwable th) {
|
||
if (!MBridgeConstans.DEBUG) {
|
||
return false;
|
||
}
|
||
th.printStackTrace();
|
||
return false;
|
||
}
|
||
}
|
||
|
||
public final void a(String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
if (this.u != null && TextUtils.isEmpty(str)) {
|
||
int b2 = this.u.b() * 1000;
|
||
List<CampaignEx> list = this.U;
|
||
if (list != null && list.size() > 0) {
|
||
if (System.currentTimeMillis() - this.U.get(0).getTimestamp() < b2) {
|
||
b("hit ltorwc", cVar);
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
a(str, this.I, cVar);
|
||
}
|
||
|
||
public class b implements Runnable {
|
||
private String b;
|
||
private com.mbridge.msdk.foundation.same.report.d.c c;
|
||
|
||
public b(String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
this.b = str;
|
||
this.c = cVar;
|
||
}
|
||
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
try {
|
||
if (com.mbridge.msdk.e.b.a()) {
|
||
c cVar = c.this;
|
||
String unused = cVar.l;
|
||
Context unused2 = c.this.k;
|
||
cVar.C = "";
|
||
}
|
||
c cVar2 = c.this;
|
||
cVar2.r = ak.a(cVar2.k, c.this.l);
|
||
if (c.this.N) {
|
||
return;
|
||
}
|
||
if (c.this.L != null && c.this.O != null) {
|
||
c.this.O.removeCallbacks(c.this.L);
|
||
}
|
||
c.this.M = true;
|
||
if (c.this.O != null) {
|
||
Message obtainMessage = c.this.O.obtainMessage();
|
||
obtainMessage.obj = this.b;
|
||
obtainMessage.what = 1;
|
||
if (this.c != null) {
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString("metrics_data_lrid", this.c.f());
|
||
obtainMessage.setData(bundle);
|
||
}
|
||
c.this.O.sendMessage(obtainMessage);
|
||
}
|
||
if (TextUtils.isEmpty(c.this.r)) {
|
||
return;
|
||
}
|
||
af.b("RewardMVVideoAdapter", "excludeId : " + c.this.r);
|
||
} catch (Exception e) {
|
||
af.b("RewardMVVideoAdapter", e.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
public class a implements Runnable {
|
||
private String b;
|
||
private com.mbridge.msdk.foundation.same.report.d.c c;
|
||
|
||
public a(String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
this.b = str;
|
||
this.c = cVar;
|
||
}
|
||
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
try {
|
||
if (c.this.M) {
|
||
return;
|
||
}
|
||
c.this.N = true;
|
||
if (c.this.O != null) {
|
||
Message obtainMessage = c.this.O.obtainMessage();
|
||
obtainMessage.obj = this.b;
|
||
obtainMessage.what = 2;
|
||
if (this.c != null) {
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString("metrics_data_lrid", this.c.f());
|
||
obtainMessage.setData(bundle);
|
||
}
|
||
c.this.O.sendMessage(obtainMessage);
|
||
}
|
||
} catch (Exception e) {
|
||
af.b("RewardMVVideoAdapter", e.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
private void b(String str, boolean z, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
com.mbridge.msdk.foundation.same.f.a.f().execute(new b(str, cVar));
|
||
if (this.O != null) {
|
||
a aVar = new a(str, cVar);
|
||
this.L = aVar;
|
||
this.O.postDelayed(aVar, 90000L);
|
||
return;
|
||
}
|
||
a(str, z, cVar);
|
||
}
|
||
|
||
public final String f() {
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList = this.H;
|
||
if (copyOnWriteArrayList != null && !copyOnWriteArrayList.isEmpty()) {
|
||
return com.mbridge.msdk.foundation.same.c.a(this.H);
|
||
}
|
||
return com.mbridge.msdk.foundation.same.c.a(this.U);
|
||
}
|
||
|
||
/* JADX INFO: Access modifiers changed from: private */
|
||
public com.mbridge.msdk.foundation.same.report.d.c a(Message message) {
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
if (message == null) {
|
||
return cVar;
|
||
}
|
||
try {
|
||
Bundle data = message.getData();
|
||
return data != null ? com.mbridge.msdk.foundation.same.report.d.d.a().a(data.getString("metrics_data_lrid"), "") : cVar;
|
||
} catch (Exception e) {
|
||
if (!MBridgeConstans.DEBUG) {
|
||
return cVar;
|
||
}
|
||
e.printStackTrace();
|
||
return cVar;
|
||
}
|
||
}
|
||
|
||
private com.mbridge.msdk.foundation.same.report.d.c c(List<CampaignEx> list) {
|
||
String str;
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
str = "";
|
||
if (list != null) {
|
||
try {
|
||
if (list.size() > 0) {
|
||
str = list.get(0) != null ? list.get(0).getLocalRequestId() : "";
|
||
cVar.c(str);
|
||
cVar.b(list);
|
||
}
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
e eVar = new e();
|
||
eVar.a("cache", 1);
|
||
eVar.a("hb", 1);
|
||
eVar.a("auto_load", 2);
|
||
cVar.a("2000127", eVar);
|
||
cVar.a("2000048", eVar);
|
||
cVar.b(this.z ? 287 : 94);
|
||
cVar.i("1");
|
||
cVar.b("2");
|
||
if (!TextUtils.isEmpty(str) && !com.mbridge.msdk.foundation.same.report.d.d.a().b().containsKey(str)) {
|
||
com.mbridge.msdk.foundation.same.report.d.d.a().b().put(str, cVar);
|
||
}
|
||
return cVar;
|
||
}
|
||
|
||
private void a(com.mbridge.msdk.foundation.same.report.d.c cVar, e eVar, List<CampaignEx> list) {
|
||
if (cVar != null) {
|
||
if (list != null) {
|
||
try {
|
||
if (list.size() > 0) {
|
||
cVar.b(list);
|
||
CampaignEx campaignEx = list.get(0);
|
||
if (campaignEx != null) {
|
||
cVar.c(campaignEx.getLocalRequestId());
|
||
}
|
||
}
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e.printStackTrace();
|
||
return;
|
||
}
|
||
return;
|
||
}
|
||
}
|
||
cVar.d(this.l);
|
||
cVar.b(this.z ? 287 : 94);
|
||
if (eVar != null) {
|
||
cVar.a("m_temp_is_ready_check", eVar);
|
||
}
|
||
com.mbridge.msdk.reward.c.a.a.a().a("m_temp_is_ready_check", cVar);
|
||
}
|
||
}
|
||
|
||
public static /* synthetic */ void a(c cVar, String str, List list, List list2, boolean z) {
|
||
com.mbridge.msdk.foundation.db.e.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c())).a(str, (List<CampaignEx>) list, (List<CampaignEx>) list2, z);
|
||
if (list2 != null && list2.size() > 0) {
|
||
Iterator it = list2.iterator();
|
||
while (it.hasNext()) {
|
||
CampaignEx campaignEx = (CampaignEx) it.next();
|
||
if (campaignEx.getRewardTemplateMode() != null && !TextUtils.isEmpty(campaignEx.getRewardTemplateMode().e())) {
|
||
com.mbridge.msdk.videocommon.a.b(str + "_" + campaignEx.getId() + "_" + campaignEx.getRequestId() + "_" + campaignEx.getRewardTemplateMode().e());
|
||
com.mbridge.msdk.videocommon.a.b(campaignEx.getAdType(), campaignEx);
|
||
}
|
||
}
|
||
}
|
||
if (z) {
|
||
cVar.a(str, (List<CampaignEx>) list, (List<CampaignEx>) list2);
|
||
}
|
||
if (list == null || list.size() <= 0) {
|
||
return;
|
||
}
|
||
try {
|
||
CampaignEx campaignEx2 = (CampaignEx) list.get(0);
|
||
com.mbridge.msdk.reward.a.a aVar = new com.mbridge.msdk.reward.a.a(str, cVar.z);
|
||
if (campaignEx2 == null || !TextUtils.isEmpty(campaignEx2.getNLRid())) {
|
||
return;
|
||
}
|
||
aVar.a(campaignEx2.getLocalRequestId(), campaignEx2.getRequestId(), 1, campaignEx2.getEcppv());
|
||
} catch (Exception e) {
|
||
e.printStackTrace();
|
||
}
|
||
}
|
||
|
||
public static /* synthetic */ void a(c cVar, String str, List list, boolean z, String str2) {
|
||
CampaignEx campaignEx;
|
||
if (!TextUtils.isEmpty(str) && list != null && list.size() > 0 && ((campaignEx = (CampaignEx) list.get(0)) == null || TextUtils.isEmpty(campaignEx.getEcppv()) || TextUtils.isEmpty(str2))) {
|
||
com.mbridge.msdk.foundation.db.e.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c())).a(str, (List<CampaignEx>) list, z);
|
||
} else {
|
||
com.mbridge.msdk.foundation.db.e.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c())).a(str, (CampaignEx) null, z, str2);
|
||
}
|
||
}
|
||
|
||
public static /* synthetic */ void a(c cVar, CampaignUnit campaignUnit) {
|
||
if (campaignUnit == null || campaignUnit.getAds() == null || campaignUnit.getAds().size() <= 0) {
|
||
return;
|
||
}
|
||
try {
|
||
com.mbridge.msdk.foundation.same.report.d.c metricsData = campaignUnit.getMetricsData();
|
||
if (metricsData != null) {
|
||
e eVar = new e();
|
||
eVar.a("result", 1);
|
||
eVar.a("timeout", Integer.valueOf(cVar.p));
|
||
eVar.a("hst", cVar.h());
|
||
metricsData.b(campaignUnit.getAds());
|
||
metricsData.a("2000126", eVar);
|
||
campaignUnit.setLocalRequestId(metricsData.f());
|
||
com.mbridge.msdk.reward.c.a.a.a().a("2000126", metricsData);
|
||
}
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardMVVideoAdapter", e.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
public static /* synthetic */ void b(c cVar, CampaignUnit campaignUnit) {
|
||
cVar.G = campaignUnit;
|
||
CopyOnWriteArrayList<CampaignEx> a2 = cVar.a(campaignUnit);
|
||
new com.mbridge.msdk.reward.a.a(cVar.l, cVar.z).a(a2, cVar.K, cVar, cVar.l);
|
||
cVar.a(a2, true, false);
|
||
}
|
||
|
||
/* JADX WARN: Removed duplicated region for block: B:24:0x0062 A[Catch: Exception -> 0x0027, TRY_ENTER, TryCatch #0 {Exception -> 0x0027, blocks: (B:4:0x0004, B:6:0x000a, B:14:0x0021, B:15:0x002f, B:17:0x004d, B:19:0x0055, B:21:0x0059, B:24:0x0062, B:25:0x007b, B:26:0x0070, B:27:0x0091, B:31:0x002a), top: B:3:0x0004 }] */
|
||
/* JADX WARN: Removed duplicated region for block: B:26:0x0070 A[Catch: Exception -> 0x0027, TryCatch #0 {Exception -> 0x0027, blocks: (B:4:0x0004, B:6:0x000a, B:14:0x0021, B:15:0x002f, B:17:0x004d, B:19:0x0055, B:21:0x0059, B:24:0x0062, B:25:0x007b, B:26:0x0070, B:27:0x0091, B:31:0x002a), top: B:3:0x0004 }] */
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
public static /* synthetic */ void a(com.mbridge.msdk.reward.adapter.c r5, com.mbridge.msdk.foundation.same.report.d.c r6, int r7) {
|
||
/*
|
||
java.lang.String r0 = "2000126"
|
||
if (r6 == 0) goto Lac
|
||
boolean r1 = r6.r() // Catch: java.lang.Exception -> L27
|
||
if (r1 != 0) goto Lac
|
||
com.mbridge.msdk.foundation.same.report.d.e r1 = new com.mbridge.msdk.foundation.same.report.d.e // Catch: java.lang.Exception -> L27
|
||
r1.<init>() // Catch: java.lang.Exception -> L27
|
||
r2 = 3
|
||
java.lang.String r3 = "result"
|
||
if (r7 == r2) goto L2a
|
||
r2 = 880023(0xd6d97, float:1.233175E-39)
|
||
if (r7 == r2) goto L2a
|
||
r2 = 880041(0xd6da9, float:1.2332E-39)
|
||
if (r7 == r2) goto L2a
|
||
switch(r7) {
|
||
case 10: goto L2a;
|
||
case 11: goto L2a;
|
||
case 12: goto L2a;
|
||
default: goto L21;
|
||
}
|
||
L21:
|
||
java.lang.String r7 = "1"
|
||
r1.a(r3, r7) // Catch: java.lang.Exception -> L27
|
||
goto L2f
|
||
L27:
|
||
r5 = move-exception
|
||
goto La5
|
||
L2a:
|
||
java.lang.String r7 = "2"
|
||
r1.a(r3, r7) // Catch: java.lang.Exception -> L27
|
||
L2f:
|
||
java.lang.String r7 = "timeout"
|
||
java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L27
|
||
r2.<init>() // Catch: java.lang.Exception -> L27
|
||
int r3 = r5.p // Catch: java.lang.Exception -> L27
|
||
r2.append(r3) // Catch: java.lang.Exception -> L27
|
||
java.lang.String r3 = ""
|
||
r2.append(r3) // Catch: java.lang.Exception -> L27
|
||
java.lang.String r2 = r2.toString() // Catch: java.lang.Exception -> L27
|
||
r1.a(r7, r2) // Catch: java.lang.Exception -> L27
|
||
com.mbridge.msdk.foundation.c.b r7 = r6.o() // Catch: java.lang.Exception -> L27
|
||
if (r7 == 0) goto L91
|
||
java.lang.String r2 = "campaign_request_error"
|
||
java.lang.Object r2 = r7.a(r2) // Catch: java.lang.Exception -> L27
|
||
if (r2 == 0) goto L91
|
||
boolean r3 = r2 instanceof com.mbridge.msdk.foundation.same.net.a.a // Catch: java.lang.Exception -> L27
|
||
if (r3 == 0) goto L91
|
||
r3 = r2
|
||
com.mbridge.msdk.foundation.same.net.a.a r3 = (com.mbridge.msdk.foundation.same.net.a.a) r3 // Catch: java.lang.Exception -> L27
|
||
com.mbridge.msdk.foundation.same.net.d.a r3 = r3.c // Catch: java.lang.Exception -> L27
|
||
java.lang.String r4 = "code"
|
||
if (r3 == 0) goto L70
|
||
com.mbridge.msdk.foundation.same.net.a.a r2 = (com.mbridge.msdk.foundation.same.net.a.a) r2 // Catch: java.lang.Exception -> L27
|
||
com.mbridge.msdk.foundation.same.net.d.a r2 = r2.c // Catch: java.lang.Exception -> L27
|
||
int r2 = r2.d // Catch: java.lang.Exception -> L27
|
||
java.lang.Integer r2 = java.lang.Integer.valueOf(r2) // Catch: java.lang.Exception -> L27
|
||
r1.a(r4, r2) // Catch: java.lang.Exception -> L27
|
||
goto L7b
|
||
L70:
|
||
int r2 = r7.a() // Catch: java.lang.Exception -> L27
|
||
java.lang.Integer r2 = java.lang.Integer.valueOf(r2) // Catch: java.lang.Exception -> L27
|
||
r1.a(r4, r2) // Catch: java.lang.Exception -> L27
|
||
L7b:
|
||
java.lang.String r2 = "reason"
|
||
java.lang.String r3 = r7.b() // Catch: java.lang.Exception -> L27
|
||
r1.a(r2, r3) // Catch: java.lang.Exception -> L27
|
||
java.lang.String r2 = "err_desc"
|
||
java.lang.String r7 = r7.l() // Catch: java.lang.Exception -> L27
|
||
r1.a(r2, r7) // Catch: java.lang.Exception -> L27
|
||
r7 = 0
|
||
r6.a(r7) // Catch: java.lang.Exception -> L27
|
||
L91:
|
||
java.lang.String r7 = "hst"
|
||
java.lang.String r5 = r5.h() // Catch: java.lang.Exception -> L27
|
||
r1.a(r7, r5) // Catch: java.lang.Exception -> L27
|
||
r6.a(r0, r1) // Catch: java.lang.Exception -> L27
|
||
com.mbridge.msdk.reward.c.a.a r5 = com.mbridge.msdk.reward.c.a.a.a() // Catch: java.lang.Exception -> L27
|
||
r5.a(r0, r6) // Catch: java.lang.Exception -> L27
|
||
goto Lac
|
||
La5:
|
||
boolean r6 = com.mbridge.msdk.MBridgeConstans.DEBUG
|
||
if (r6 == 0) goto Lac
|
||
r5.printStackTrace()
|
||
Lac:
|
||
return
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.adapter.c.a(com.mbridge.msdk.reward.adapter.c, com.mbridge.msdk.foundation.same.report.d.c, int):void");
|
||
}
|
||
|
||
public static /* synthetic */ void a(c cVar, List list) {
|
||
if (cVar.k == null || list == null || list.size() == 0) {
|
||
return;
|
||
}
|
||
com.mbridge.msdk.foundation.db.j a2 = com.mbridge.msdk.foundation.db.j.a(com.mbridge.msdk.foundation.db.g.a(cVar.k));
|
||
for (int i = 0; i < list.size(); i++) {
|
||
CampaignEx campaignEx = (CampaignEx) list.get(i);
|
||
if (campaignEx != null) {
|
||
if (com.mbridge.msdk.e.b.a()) {
|
||
if (!ak.c(cVar.k, campaignEx.getPackageName())) {
|
||
cVar.a(a2, campaignEx);
|
||
}
|
||
} else {
|
||
cVar.a(a2, campaignEx);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|