- 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
2576 lines
112 KiB
Java
2576 lines
112 KiB
Java
package com.mbridge.msdk.reward.b;
|
||
|
||
import android.content.Context;
|
||
import android.os.Bundle;
|
||
import android.os.Handler;
|
||
import android.os.Looper;
|
||
import android.os.Message;
|
||
import android.text.TextUtils;
|
||
import com.mbridge.msdk.MBridgeConstans;
|
||
import com.mbridge.msdk.c.h;
|
||
import com.mbridge.msdk.foundation.b.a;
|
||
import com.mbridge.msdk.foundation.db.g;
|
||
import com.mbridge.msdk.foundation.db.i;
|
||
import com.mbridge.msdk.foundation.download.download.H5DownLoadManager;
|
||
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
||
import com.mbridge.msdk.foundation.entity.f;
|
||
import com.mbridge.msdk.foundation.same.report.d.e;
|
||
import com.mbridge.msdk.foundation.tools.SameMD5;
|
||
import com.mbridge.msdk.foundation.tools.af;
|
||
import com.mbridge.msdk.foundation.tools.ah;
|
||
import com.mbridge.msdk.foundation.tools.ak;
|
||
import com.mbridge.msdk.foundation.tools.an;
|
||
import com.mbridge.msdk.foundation.tools.ap;
|
||
import com.mbridge.msdk.out.MBridgeIds;
|
||
import com.mbridge.msdk.out.RewardInfo;
|
||
import com.mbridge.msdk.reward.adapter.b;
|
||
import com.mbridge.msdk.videocommon.a;
|
||
import com.mbridge.msdk.videocommon.listener.InterVideoOutListener;
|
||
import com.tapjoy.TJAdUnitConstants;
|
||
import java.lang.ref.WeakReference;
|
||
import java.util.ArrayList;
|
||
import java.util.Collection;
|
||
import java.util.Iterator;
|
||
import java.util.LinkedHashMap;
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
import java.util.Queue;
|
||
import java.util.concurrent.ConcurrentHashMap;
|
||
import java.util.concurrent.CopyOnWriteArrayList;
|
||
import java.util.concurrent.atomic.AtomicInteger;
|
||
import org.json.JSONObject;
|
||
|
||
/* loaded from: classes4.dex */
|
||
public class a {
|
||
public static String b = "";
|
||
public static String d = null;
|
||
public static String e = "";
|
||
private int A;
|
||
private int B;
|
||
private int C;
|
||
private boolean H;
|
||
private Queue<Integer> P;
|
||
private String Q;
|
||
private CopyOnWriteArrayList<CampaignEx> Z;
|
||
b a;
|
||
private List<CampaignEx> aa;
|
||
private Context l;
|
||
private com.mbridge.msdk.reward.adapter.c m;
|
||
private com.mbridge.msdk.videocommon.d.c n;
|
||
private com.mbridge.msdk.videocommon.d.a o;
|
||
private volatile InterVideoOutListener p;
|
||
private volatile c q;
|
||
private String r;
|
||
private String s;
|
||
private MBridgeIds t;
|
||
private String u;
|
||
private volatile String v;
|
||
private String w;
|
||
private static ConcurrentHashMap<String, Integer> N = new ConcurrentHashMap<>();
|
||
private static ConcurrentHashMap<String, String> O = new ConcurrentHashMap<>();
|
||
public static ConcurrentHashMap<String, d> f = new ConcurrentHashMap<>();
|
||
private int x = 0;
|
||
private int z = 2;
|
||
private boolean D = false;
|
||
private boolean E = false;
|
||
private boolean F = false;
|
||
private boolean G = false;
|
||
private boolean I = false;
|
||
private ArrayList<Integer> J = new ArrayList<>(7);
|
||
private boolean K = false;
|
||
private final Object L = new Object();
|
||
public boolean c = false;
|
||
private List<CampaignEx> M = new ArrayList();
|
||
private g R = null;
|
||
private volatile boolean S = true;
|
||
private volatile boolean T = false;
|
||
private volatile boolean U = false;
|
||
private volatile boolean V = false;
|
||
private volatile boolean W = false;
|
||
private volatile boolean X = false;
|
||
private volatile boolean Y = false;
|
||
volatile boolean g = false;
|
||
volatile boolean h = false;
|
||
volatile boolean i = false;
|
||
volatile boolean j = false;
|
||
volatile boolean k = false;
|
||
private Handler y = new com.mbridge.msdk.reward.b.b(this);
|
||
|
||
public final void a(int i) {
|
||
this.z = i;
|
||
}
|
||
|
||
public final void b(boolean z) {
|
||
this.E = z;
|
||
}
|
||
|
||
public final void c(boolean z) {
|
||
this.I = z;
|
||
}
|
||
|
||
public final CopyOnWriteArrayList<CampaignEx> e() {
|
||
return this.Z;
|
||
}
|
||
|
||
public final List<CampaignEx> f() {
|
||
return this.aa;
|
||
}
|
||
|
||
public final com.mbridge.msdk.reward.adapter.c g() {
|
||
return this.m;
|
||
}
|
||
|
||
public final boolean h() {
|
||
return this.H;
|
||
}
|
||
|
||
public final String i() {
|
||
return this.s;
|
||
}
|
||
|
||
public final String j() {
|
||
return this.v;
|
||
}
|
||
|
||
public final c k() {
|
||
return this.q;
|
||
}
|
||
|
||
public final InterVideoOutListener l() {
|
||
return this.p;
|
||
}
|
||
|
||
public final boolean m() {
|
||
return this.E;
|
||
}
|
||
|
||
public final MBridgeIds n() {
|
||
return this.t;
|
||
}
|
||
|
||
public final boolean o() {
|
||
return this.D;
|
||
}
|
||
|
||
public final void a(boolean z) {
|
||
this.D = z;
|
||
if (z) {
|
||
this.z = com.mbridge.msdk.foundation.same.a.X;
|
||
} else {
|
||
this.z = com.mbridge.msdk.foundation.same.a.W;
|
||
}
|
||
}
|
||
|
||
public final String a() {
|
||
com.mbridge.msdk.reward.adapter.c cVar = this.m;
|
||
return cVar != null ? cVar.a(this.K) : "";
|
||
}
|
||
|
||
public final void a(String str, String str2, String str3, String str4) {
|
||
if (!TextUtils.isEmpty(str)) {
|
||
an.b(this.l, "MBridge_ConfirmTitle" + this.s, str.trim());
|
||
}
|
||
if (!TextUtils.isEmpty(str2)) {
|
||
an.b(this.l, "MBridge_ConfirmContent" + this.s, str2.trim());
|
||
}
|
||
if (!TextUtils.isEmpty(str4)) {
|
||
an.b(this.l, "MBridge_CancelText" + this.s, str4.trim());
|
||
}
|
||
if (TextUtils.isEmpty(str3)) {
|
||
return;
|
||
}
|
||
an.b(this.l, "MBridge_ConfirmText" + this.s, str3.trim());
|
||
}
|
||
|
||
public final void a(int i, int i2, int i3) {
|
||
this.A = i;
|
||
this.B = i2;
|
||
if (i2 == com.mbridge.msdk.foundation.same.a.K) {
|
||
this.C = i3 < 0 ? 5 : i3;
|
||
}
|
||
if (i2 == com.mbridge.msdk.foundation.same.a.J) {
|
||
this.C = i3 < 0 ? 80 : i3;
|
||
}
|
||
try {
|
||
JSONObject jSONObject = new JSONObject();
|
||
jSONObject.put("ivRewardEnable", 1);
|
||
jSONObject.put("ivRewardMode", i == com.mbridge.msdk.foundation.same.a.H ? 0 : 1);
|
||
jSONObject.put("ivRewardPlayValueMode", i2 == com.mbridge.msdk.foundation.same.a.J ? 0 : 1);
|
||
jSONObject.put("ivRewardPlayValue", i3);
|
||
h.a().f(this.s, jSONObject.toString());
|
||
} catch (Exception unused) {
|
||
af.b("RewardVideoController", "setIVRewardEnable to SP was ERROR");
|
||
}
|
||
}
|
||
|
||
public static void a(String str, int i) {
|
||
try {
|
||
if (N == null || !ap.b(str)) {
|
||
return;
|
||
}
|
||
N.put(str, Integer.valueOf(i));
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
public static void a(String str, String str2) {
|
||
ConcurrentHashMap<String, String> concurrentHashMap;
|
||
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || (concurrentHashMap = O) == null || concurrentHashMap.containsKey(str)) {
|
||
return;
|
||
}
|
||
O.put(str, str2);
|
||
}
|
||
|
||
public final void b() {
|
||
ConcurrentHashMap<String, String> concurrentHashMap;
|
||
if (!this.K || (concurrentHashMap = O) == null || concurrentHashMap.containsKey(a())) {
|
||
return;
|
||
}
|
||
O.remove(a());
|
||
}
|
||
|
||
public final void c() {
|
||
try {
|
||
String str = "";
|
||
MBridgeIds mBridgeIds = this.t;
|
||
if (mBridgeIds != null) {
|
||
if (!this.K) {
|
||
mBridgeIds.setBidToken("");
|
||
return;
|
||
}
|
||
String a = a();
|
||
if (TextUtils.isEmpty(a)) {
|
||
return;
|
||
}
|
||
ConcurrentHashMap<String, String> concurrentHashMap = O;
|
||
if (concurrentHashMap != null && concurrentHashMap.containsKey(a) && !TextUtils.isEmpty(O.get(a))) {
|
||
str = O.get(a);
|
||
}
|
||
this.t.setBidToken(str);
|
||
}
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e2.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
|
||
public static void insertExcludeId(String str, CampaignEx campaignEx) {
|
||
if (TextUtils.isEmpty(str) || campaignEx == null || com.mbridge.msdk.foundation.controller.c.m().c() == null) {
|
||
return;
|
||
}
|
||
i a = i.a(g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
|
||
f fVar = new f();
|
||
fVar.a(System.currentTimeMillis());
|
||
fVar.b(str);
|
||
fVar.a(campaignEx.getId());
|
||
a.a(fVar);
|
||
}
|
||
|
||
public final class d extends com.mbridge.msdk.video.bt.module.b.b {
|
||
private a d;
|
||
private Handler e;
|
||
private int f;
|
||
|
||
private d(a aVar, Handler handler) {
|
||
this.f = 0;
|
||
this.d = aVar;
|
||
this.e = handler;
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
|
||
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
a.this.c = false;
|
||
try {
|
||
com.mbridge.msdk.reward.a.a aVar = new com.mbridge.msdk.reward.a.a(a.this.s, a.this.D);
|
||
a aVar2 = this.d;
|
||
aVar.a(cVar.f(), (aVar2 == null || aVar2.m == null) ? "" : this.d.m.c, 3, a.b);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e.getMessage());
|
||
}
|
||
}
|
||
try {
|
||
a aVar3 = this.d;
|
||
if (aVar3 != null) {
|
||
aVar3.K = true;
|
||
if (this.d.m != null) {
|
||
this.d.m.c = "";
|
||
}
|
||
final a aVar4 = this.d;
|
||
com.mbridge.msdk.foundation.same.f.a.b().execute(new Runnable() { // from class: com.mbridge.msdk.reward.b.a.5
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
try {
|
||
if (a.this.R == null) {
|
||
a.this.R = g.a(com.mbridge.msdk.foundation.controller.c.m().c());
|
||
}
|
||
com.mbridge.msdk.foundation.db.h a = com.mbridge.msdk.foundation.db.h.a(a.this.R);
|
||
if (a != null) {
|
||
a.a(a.this.s);
|
||
}
|
||
} catch (Throwable unused) {
|
||
af.b("RewardVideoController", "can't find DailyPlayCapDao");
|
||
}
|
||
}
|
||
});
|
||
if (a.this.E) {
|
||
a.this.c();
|
||
}
|
||
a aVar5 = a.this;
|
||
aVar5.a("2000130", cVar, aVar5.p, "");
|
||
this.b = true;
|
||
if (this.d.p != null) {
|
||
this.d.p.onAdShow(a.this.t);
|
||
this.f = 2;
|
||
}
|
||
}
|
||
} catch (Throwable th) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", th.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
|
||
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, boolean z, com.mbridge.msdk.videocommon.b.c cVar2) {
|
||
try {
|
||
a aVar = this.d;
|
||
if (aVar != null && aVar.p != null) {
|
||
if (cVar2 == null) {
|
||
cVar2 = com.mbridge.msdk.videocommon.b.c.b(this.d.w);
|
||
}
|
||
if (a.this.E) {
|
||
a.this.c();
|
||
a.this.b();
|
||
com.mbridge.msdk.foundation.same.a.b.d(a.this.s, a.this.a());
|
||
}
|
||
this.d.p.onAdClose(a.this.t, new RewardInfo(z, cVar2.a(), String.valueOf(cVar2.b())));
|
||
this.f = 7;
|
||
this.d.K = false;
|
||
a.this.J.clear();
|
||
this.d = null;
|
||
}
|
||
com.mbridge.msdk.foundation.same.report.d.d.a().a("2000152", cVar, (com.mbridge.msdk.foundation.same.report.d.a.a) null);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
|
||
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, String str) {
|
||
try {
|
||
a aVar = a.this;
|
||
aVar.c = false;
|
||
if (this.d != null) {
|
||
if (aVar.E) {
|
||
a.this.c();
|
||
}
|
||
this.d.K = false;
|
||
a.this.a("2000131", cVar, this.d.p, str);
|
||
this.c = true;
|
||
if (this.d.p != null) {
|
||
try {
|
||
this.d.p.onShowFail(cVar, a.this.t, str);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e.getMessage());
|
||
}
|
||
}
|
||
this.f = 4;
|
||
}
|
||
}
|
||
} catch (Exception e2) {
|
||
this.f = 0;
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
|
||
public final void a(boolean z, String str, String str2) {
|
||
try {
|
||
a aVar = this.d;
|
||
if (aVar == null || aVar.p == null) {
|
||
return;
|
||
}
|
||
if (a.this.E) {
|
||
a.this.c();
|
||
}
|
||
this.d.K = false;
|
||
try {
|
||
this.d.p.onVideoAdClicked(z, a.this.t);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e.getMessage());
|
||
}
|
||
}
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
|
||
public final void a(String str, String str2) {
|
||
try {
|
||
a aVar = this.d;
|
||
if (aVar == null || aVar.p == null) {
|
||
return;
|
||
}
|
||
try {
|
||
this.d.p.onVideoComplete(a.this.t);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e.getMessage());
|
||
}
|
||
}
|
||
this.f = 5;
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
|
||
public final void a(boolean z, int i) {
|
||
try {
|
||
a aVar = this.d;
|
||
if (aVar != null && aVar.p != null) {
|
||
try {
|
||
this.d.p.onAdCloseWithIVReward(a.this.t, new RewardInfo(z, i));
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e.getMessage());
|
||
}
|
||
}
|
||
}
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
|
||
public final void b(String str, String str2) {
|
||
try {
|
||
a aVar = this.d;
|
||
if (aVar == null || aVar.p == null) {
|
||
return;
|
||
}
|
||
try {
|
||
this.d.p.onEndcardShow(a.this.t);
|
||
com.mbridge.msdk.foundation.d.b.a().a(str2 + "_2", 2);
|
||
} catch (Exception e) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e.getMessage());
|
||
}
|
||
}
|
||
this.f = 6;
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
|
||
public final void a(int i, String str, String str2) {
|
||
this.f = i;
|
||
a aVar = this.d;
|
||
if (aVar == null || aVar.E || this.d.D || this.d.n == null || !this.d.n.s(this.f) || this.d.q == null || c.a(this.d.q) == 1 || c.a(this.d.q) == 3 || a.this.J.contains(Integer.valueOf(this.f))) {
|
||
return;
|
||
}
|
||
a.this.J.add(Integer.valueOf(this.f));
|
||
int A = this.d.n.A() * 1000;
|
||
if (this.f == 4) {
|
||
A = 3000;
|
||
}
|
||
Handler handler = this.e;
|
||
if (handler != null) {
|
||
handler.removeMessages(1001001);
|
||
this.e.sendEmptyMessageDelayed(1001001, A);
|
||
} else {
|
||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() { // from class: com.mbridge.msdk.reward.b.a.d.1
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
if (d.this.d != null) {
|
||
d.this.d.a(false, com.mbridge.msdk.foundation.same.report.d.d.a().a(0, a.this.D ? 287 : 94, a.this.s, true, 1));
|
||
}
|
||
}
|
||
}, A);
|
||
}
|
||
}
|
||
}
|
||
|
||
public final void a(InterVideoOutListener interVideoOutListener) {
|
||
this.p = interVideoOutListener;
|
||
this.q = new c(interVideoOutListener, this.y, this.s);
|
||
}
|
||
|
||
public final void b(String str, String str2) {
|
||
try {
|
||
this.l = com.mbridge.msdk.foundation.controller.c.m().c();
|
||
this.s = str2;
|
||
if (TextUtils.isEmpty(str)) {
|
||
str = "";
|
||
}
|
||
this.v = str;
|
||
this.t = new MBridgeIds(this.v, this.s);
|
||
this.o = com.mbridge.msdk.videocommon.d.b.a().b();
|
||
com.mbridge.msdk.foundation.same.f.a.b().execute(new com.mbridge.msdk.reward.b.c(this.l, this.s));
|
||
if (this.R == null) {
|
||
this.R = g.a(com.mbridge.msdk.foundation.controller.c.m().c());
|
||
}
|
||
} catch (Throwable th) {
|
||
af.b("RewardVideoController", th.getMessage(), th);
|
||
}
|
||
}
|
||
|
||
public final void a(boolean z, e eVar) {
|
||
a(z, "", eVar);
|
||
}
|
||
|
||
private void p() {
|
||
com.mbridge.msdk.foundation.db.e.a(g.a(this.l)).a(this.s);
|
||
}
|
||
|
||
private void q() {
|
||
try {
|
||
List<CampaignEx> b2 = com.mbridge.msdk.foundation.db.e.a(g.a(this.l)).b(this.s);
|
||
if (b2 == null || b2.size() <= 0) {
|
||
return;
|
||
}
|
||
for (CampaignEx campaignEx : b2) {
|
||
if (!TextUtils.isEmpty(campaignEx.getCMPTEntryUrl())) {
|
||
com.mbridge.msdk.videocommon.a.b(this.s + "_" + campaignEx.getRequestId() + "_" + campaignEx.getCMPTEntryUrl());
|
||
if (campaignEx.getRewardTemplateMode() != null && !TextUtils.isEmpty(campaignEx.getRewardTemplateMode().e())) {
|
||
com.mbridge.msdk.videocommon.a.b(this.s + "_" + campaignEx.getId() + "_" + campaignEx.getRequestId() + "_" + campaignEx.getRewardTemplateMode().e());
|
||
}
|
||
} else {
|
||
com.mbridge.msdk.videocommon.a.b(campaignEx.getAdType(), campaignEx);
|
||
}
|
||
}
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
private com.mbridge.msdk.foundation.same.report.d.c b(boolean z, String str, e eVar) {
|
||
List<String> e2;
|
||
String a;
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
try {
|
||
if (z) {
|
||
try {
|
||
com.mbridge.msdk.foundation.db.e a2 = com.mbridge.msdk.foundation.db.e.a(g.a(this.l));
|
||
if (a2 != null && (e2 = a2.e(this.s)) != null && e2.size() > 0) {
|
||
Iterator<String> it = e2.iterator();
|
||
while (it.hasNext()) {
|
||
com.mbridge.msdk.foundation.same.report.d.d.a().b(it.next());
|
||
}
|
||
}
|
||
LinkedHashMap<String, com.mbridge.msdk.foundation.same.report.d.c> b2 = com.mbridge.msdk.foundation.same.report.d.d.a().b();
|
||
if (b2 != null && b2.size() > 0) {
|
||
Iterator<Map.Entry<String, com.mbridge.msdk.foundation.same.report.d.c>> it2 = b2.entrySet().iterator();
|
||
while (it2.hasNext()) {
|
||
Map.Entry<String, com.mbridge.msdk.foundation.same.report.d.c> next = it2.next();
|
||
if (next != null && next.getValue().s()) {
|
||
it2.remove();
|
||
}
|
||
}
|
||
}
|
||
} catch (Exception e3) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e3.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
if (TextUtils.isEmpty(str)) {
|
||
a = SameMD5.getMD5(ak.d());
|
||
} else {
|
||
a = a(str);
|
||
}
|
||
cVar = com.mbridge.msdk.foundation.same.report.d.d.a().a(a, "");
|
||
if (cVar == null) {
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar2 = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
try {
|
||
com.mbridge.msdk.foundation.same.report.d.d.a().b().put(a, cVar2);
|
||
cVar2.d(true);
|
||
cVar = cVar2;
|
||
} catch (Exception e4) {
|
||
e = e4;
|
||
cVar = cVar2;
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e.getMessage());
|
||
}
|
||
return cVar;
|
||
}
|
||
}
|
||
cVar.c(a);
|
||
cVar.d(this.s);
|
||
if (eVar != null) {
|
||
if (eVar.a("adtp")) {
|
||
cVar.b(Integer.parseInt((String) eVar.b("adtp")));
|
||
}
|
||
if (eVar.a("hb")) {
|
||
String str2 = (String) eVar.b("hb");
|
||
cVar.i(str2);
|
||
if (str2.equals("1")) {
|
||
cVar.e(str);
|
||
}
|
||
}
|
||
}
|
||
cVar.b(z ? "2" : "1");
|
||
if (z) {
|
||
com.mbridge.msdk.reward.c.a.a.a().a("2000123", cVar);
|
||
}
|
||
} catch (Exception e5) {
|
||
e = e5;
|
||
}
|
||
return cVar;
|
||
}
|
||
|
||
public final void a(boolean z, String str, e eVar) {
|
||
com.mbridge.msdk.foundation.same.report.d.c b2 = b(z, str, eVar);
|
||
if (this.q == null) {
|
||
this.q = new c(null, this.y, this.s);
|
||
}
|
||
if (this.q != null && c.a(this.q) == 1) {
|
||
a(z, b2);
|
||
return;
|
||
}
|
||
if (this.q == null || c.a(this.q) != 3) {
|
||
this.S = true;
|
||
if (this.q != null) {
|
||
c.a(this.q, 1);
|
||
}
|
||
} else {
|
||
this.S = false;
|
||
}
|
||
this.H = z;
|
||
this.y.removeMessages(1001001);
|
||
this.V = false;
|
||
this.U = false;
|
||
this.W = false;
|
||
this.X = false;
|
||
q();
|
||
p();
|
||
com.mbridge.msdk.reward.adapter.b.a();
|
||
try {
|
||
if (TextUtils.isEmpty(str)) {
|
||
if (this.D) {
|
||
com.mbridge.msdk.d.b.getInstance().addInterstitialList(this.v, this.s);
|
||
} else {
|
||
com.mbridge.msdk.d.b.getInstance().addRewardList(this.v, this.s);
|
||
}
|
||
}
|
||
if (this.E && TextUtils.isEmpty(str)) {
|
||
b(b2);
|
||
return;
|
||
}
|
||
if (com.mbridge.msdk.system.a.map == null) {
|
||
a(b2);
|
||
return;
|
||
}
|
||
com.mbridge.msdk.videocommon.d.c a = com.mbridge.msdk.videocommon.d.b.a().a(com.mbridge.msdk.foundation.controller.c.m().k(), this.s);
|
||
this.n = a;
|
||
if (a == null) {
|
||
this.Q = com.mbridge.msdk.foundation.controller.c.m().k();
|
||
com.mbridge.msdk.videocommon.d.b.a().a(this.Q, com.mbridge.msdk.foundation.controller.c.m().b(), this.s, new com.mbridge.msdk.videocommon.c.c() { // from class: com.mbridge.msdk.reward.b.a.1
|
||
@Override // com.mbridge.msdk.videocommon.c.c
|
||
public final void a(String str2) {
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.videocommon.c.c
|
||
public final void b(String str2) {
|
||
}
|
||
});
|
||
this.n = com.mbridge.msdk.videocommon.d.b.a().a(com.mbridge.msdk.foundation.controller.c.m().k(), this.s, this.D);
|
||
}
|
||
if (!TextUtils.isEmpty(this.v)) {
|
||
this.n.b(this.v);
|
||
}
|
||
int F = this.n.F() * 1000;
|
||
if (this.y != null) {
|
||
Message obtain = Message.obtain();
|
||
obtain.what = 1001002;
|
||
if (b2 != null) {
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString("metrics_data_lrid", b2.f());
|
||
obtain.setData(bundle);
|
||
}
|
||
this.y.sendMessageDelayed(obtain, F);
|
||
}
|
||
this.P = this.n.B();
|
||
try {
|
||
a(z, str, b2);
|
||
} catch (Exception e2) {
|
||
if (this.q != null) {
|
||
com.mbridge.msdk.foundation.c.b b3 = com.mbridge.msdk.foundation.c.a.b(880020, "load exception");
|
||
if (b2 != null) {
|
||
b2.a(b3);
|
||
b2.c(true);
|
||
}
|
||
this.q.a(b3, b2);
|
||
}
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
} catch (Exception e3) {
|
||
if (this.q != null) {
|
||
com.mbridge.msdk.foundation.c.b b4 = com.mbridge.msdk.foundation.c.a.b(880001, "");
|
||
if (b2 != null) {
|
||
b2.a(b4);
|
||
b2.c(true);
|
||
}
|
||
this.q.a(b4, b2);
|
||
}
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e3.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
private void a(com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
if (this.q != null) {
|
||
String a = com.mbridge.msdk.foundation.c.a.a(880001, "");
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880001, "");
|
||
if (cVar != null) {
|
||
cVar.a(b2);
|
||
cVar.c(true);
|
||
}
|
||
c.a(this.q, a, cVar);
|
||
}
|
||
}
|
||
|
||
private void b(com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
if (this.q != null) {
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880035, "");
|
||
if (cVar != null) {
|
||
cVar.a(b2);
|
||
cVar.c(true);
|
||
}
|
||
c.a(this.q, "bidToken is empty", cVar);
|
||
}
|
||
}
|
||
|
||
private void a(boolean z, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
if (!this.H) {
|
||
if (z) {
|
||
this.H = z;
|
||
}
|
||
} else if (z) {
|
||
String a = com.mbridge.msdk.foundation.c.a.a(880016, "errorCode: 3501 errorMessage: current unit is loading");
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880016, "errorCode: 3501 errorMessage: current unit is loading");
|
||
if (cVar != null) {
|
||
cVar.a(b2);
|
||
cVar.c(true);
|
||
}
|
||
this.q.a(a, cVar);
|
||
}
|
||
}
|
||
|
||
private void a(boolean z, String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
com.mbridge.msdk.reward.a.a aVar;
|
||
com.mbridge.msdk.reward.a.a aVar2;
|
||
if (this.q != null) {
|
||
if (!this.E) {
|
||
this.Y = c(this.s, cVar.f());
|
||
if (this.Y) {
|
||
if (!s()) {
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList = this.Z;
|
||
if (copyOnWriteArrayList == null || copyOnWriteArrayList.size() <= 0) {
|
||
return;
|
||
}
|
||
try {
|
||
e eVar = new e();
|
||
eVar.a("cache", 1);
|
||
cVar.a("2000127", eVar);
|
||
cVar.a("2000048", eVar);
|
||
cVar.a(copyOnWriteArrayList);
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
c.a(this.q, this.v, this.s, cVar);
|
||
CampaignEx campaignEx = copyOnWriteArrayList.get(0);
|
||
this.q.a(this.E);
|
||
com.mbridge.msdk.reward.adapter.c cVar2 = this.m;
|
||
if (cVar2 != null && cVar2.a(copyOnWriteArrayList, !TextUtils.isEmpty(campaignEx.getCMPTEntryUrl()), campaignEx.getNscpt())) {
|
||
a(copyOnWriteArrayList);
|
||
this.q.b(this.v, this.s, cVar);
|
||
} else {
|
||
a(copyOnWriteArrayList, this.m);
|
||
}
|
||
if (this.S) {
|
||
com.mbridge.msdk.reward.adapter.c cVar3 = this.m;
|
||
if (cVar3 != null) {
|
||
cVar3.a(this.Z);
|
||
}
|
||
a(this.P, z, str, cVar);
|
||
return;
|
||
}
|
||
return;
|
||
}
|
||
af.a("RewardVideoController", "非BID,本地存在可用的缓存,超过上限");
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList2 = this.Z;
|
||
if (copyOnWriteArrayList2 != null && copyOnWriteArrayList2.size() > 0) {
|
||
Iterator<CampaignEx> it = this.Z.iterator();
|
||
while (it.hasNext()) {
|
||
com.mbridge.msdk.videocommon.a.a.a().a(it.next(), this.s);
|
||
}
|
||
}
|
||
com.mbridge.msdk.reward.adapter.c cVar4 = this.m;
|
||
if (cVar4 != null) {
|
||
cVar4.a(this.Z);
|
||
}
|
||
if (!z) {
|
||
this.Y = false;
|
||
this.q.a(this.E);
|
||
a(this.P, z, str, cVar);
|
||
return;
|
||
} else {
|
||
if (this.q != null) {
|
||
String a = com.mbridge.msdk.foundation.c.a.a(880019, "");
|
||
cVar.a(com.mbridge.msdk.foundation.c.a.b(880019, ""));
|
||
cVar.c(true);
|
||
c.a(this.q, a, cVar);
|
||
return;
|
||
}
|
||
return;
|
||
}
|
||
}
|
||
if (!s()) {
|
||
this.Y = false;
|
||
com.mbridge.msdk.reward.adapter.c cVar5 = this.m;
|
||
if (cVar5 != null) {
|
||
cVar5.a(this.Z);
|
||
}
|
||
this.q.a(this.E);
|
||
a(this.P, z, str, cVar);
|
||
return;
|
||
}
|
||
if (z) {
|
||
if (this.q != null) {
|
||
String a2 = com.mbridge.msdk.foundation.c.a.a(880019, "");
|
||
cVar.a(com.mbridge.msdk.foundation.c.a.b(880019, ""));
|
||
cVar.c(true);
|
||
c.a(this.q, a2, cVar);
|
||
return;
|
||
}
|
||
return;
|
||
}
|
||
this.Y = false;
|
||
com.mbridge.msdk.reward.adapter.c cVar6 = this.m;
|
||
if (cVar6 != null) {
|
||
cVar6.a(this.Z);
|
||
}
|
||
this.q.a(this.E);
|
||
a(this.P, z, str, cVar);
|
||
return;
|
||
}
|
||
CopyOnWriteArrayList<CampaignEx> a3 = com.mbridge.msdk.videocommon.a.a.a().a(this.s, 1, this.E, "");
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList3 = null;
|
||
if (a3 != null && a3.size() > 0) {
|
||
if (s()) {
|
||
com.mbridge.msdk.videocommon.a.a.a().a(this.s, str);
|
||
if (!z || this.q == null) {
|
||
return;
|
||
}
|
||
String a4 = com.mbridge.msdk.foundation.c.a.a(880019, "");
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880019, "");
|
||
if (cVar != null) {
|
||
cVar.a(b2);
|
||
cVar.c(true);
|
||
}
|
||
c.a(this.q, a4, cVar);
|
||
return;
|
||
}
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList4 = new CopyOnWriteArrayList<>();
|
||
if (a3.size() > 0 && !TextUtils.isEmpty(str)) {
|
||
for (CampaignEx campaignEx2 : a3) {
|
||
if (campaignEx2 != null && str.equals(campaignEx2.getBidToken())) {
|
||
copyOnWriteArrayList4.add(campaignEx2);
|
||
}
|
||
}
|
||
}
|
||
if (copyOnWriteArrayList4.size() > 0) {
|
||
a(copyOnWriteArrayList4, str, cVar);
|
||
return;
|
||
}
|
||
try {
|
||
com.mbridge.msdk.reward.a.a aVar3 = new com.mbridge.msdk.reward.a.a(this.s, this.D);
|
||
com.mbridge.msdk.foundation.b.c cVar7 = new com.mbridge.msdk.foundation.b.c();
|
||
if (aVar3.a(str)) {
|
||
if (this.m == null) {
|
||
com.mbridge.msdk.reward.adapter.c cVar8 = new com.mbridge.msdk.reward.adapter.c(this.l, this.v, this.s);
|
||
this.m = cVar8;
|
||
cVar8.b(this.D);
|
||
this.m.c(this.E);
|
||
if (this.D) {
|
||
this.m.a(this.A, this.B, this.C);
|
||
}
|
||
this.m.a(this.z);
|
||
this.m.a(this.n);
|
||
}
|
||
aVar2 = aVar3;
|
||
cVar7 = aVar3.a(str, cVar, (CampaignEx) null, new com.mbridge.msdk.foundation.c.b(880038), 1, this.m);
|
||
if (cVar7 != null && cVar7.g() == com.mbridge.msdk.foundation.b.c.d && cVar7.a() != null && cVar7.a().size() > 0 && this.m != null) {
|
||
CopyOnWriteArrayList<CampaignEx> a5 = cVar7.a();
|
||
ArrayList arrayList = new ArrayList();
|
||
Iterator<CampaignEx> it2 = a3.iterator();
|
||
while (true) {
|
||
if (!it2.hasNext()) {
|
||
break;
|
||
}
|
||
CampaignEx next = it2.next();
|
||
if (next != null) {
|
||
String requestId = next.getRequestId();
|
||
if (!TextUtils.isEmpty(requestId)) {
|
||
for (int i = 0; i < a5.size(); i++) {
|
||
CampaignEx campaignEx3 = a5.get(i);
|
||
if (campaignEx3 != null) {
|
||
if (requestId.equals(campaignEx3.getRequestId())) {
|
||
break;
|
||
} else if (i == a5.size() - 1) {
|
||
arrayList.add(next);
|
||
}
|
||
}
|
||
}
|
||
if (a5.size() == 0) {
|
||
arrayList.add(next);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
this.m.a(arrayList);
|
||
this.m.a(cVar7.a(), false, true);
|
||
copyOnWriteArrayList3 = new CopyOnWriteArrayList<>(cVar7.a());
|
||
}
|
||
} else {
|
||
aVar2 = aVar3;
|
||
copyOnWriteArrayList3 = a(str, a3);
|
||
if (copyOnWriteArrayList3.size() > 0) {
|
||
com.mbridge.msdk.foundation.db.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).a(str, copyOnWriteArrayList3);
|
||
}
|
||
cVar7.d("cb is closed");
|
||
cVar7.a(com.mbridge.msdk.foundation.b.c.c);
|
||
}
|
||
aVar2.a(cVar, str, cVar7, (List<a.C0195a>) null, (JSONObject) null, 1);
|
||
if (copyOnWriteArrayList3 != null && copyOnWriteArrayList3.size() > 0) {
|
||
a(copyOnWriteArrayList3, str, cVar);
|
||
if (this.m != null && !aVar2.a(str)) {
|
||
this.m.a(copyOnWriteArrayList3);
|
||
}
|
||
}
|
||
} catch (Exception e3) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e3.getMessage());
|
||
}
|
||
}
|
||
this.Y = false;
|
||
this.q.a(this.E);
|
||
a(this.P, z, str, cVar);
|
||
return;
|
||
}
|
||
if (!s()) {
|
||
try {
|
||
com.mbridge.msdk.reward.a.a aVar4 = new com.mbridge.msdk.reward.a.a(this.s, this.D);
|
||
com.mbridge.msdk.foundation.b.c cVar9 = new com.mbridge.msdk.foundation.b.c();
|
||
if (aVar4.a(str)) {
|
||
if (this.m == null) {
|
||
com.mbridge.msdk.reward.adapter.c cVar10 = new com.mbridge.msdk.reward.adapter.c(this.l, this.v, this.s);
|
||
this.m = cVar10;
|
||
cVar10.b(this.D);
|
||
this.m.c(this.E);
|
||
if (this.D) {
|
||
this.m.a(this.A, this.B, this.C);
|
||
}
|
||
this.m.a(this.z);
|
||
this.m.a(this.n);
|
||
}
|
||
aVar = aVar4;
|
||
cVar9 = aVar4.a(str, cVar, (CampaignEx) null, new com.mbridge.msdk.foundation.c.b(880038), 1, this.m);
|
||
if (cVar9 != null && cVar9.g() == com.mbridge.msdk.foundation.b.c.d && cVar9.a() != null && cVar9.a().size() > 0 && this.m != null) {
|
||
CopyOnWriteArrayList<CampaignEx> a6 = cVar9.a();
|
||
if (a3 != null) {
|
||
ArrayList arrayList2 = new ArrayList();
|
||
Iterator<CampaignEx> it3 = a3.iterator();
|
||
while (true) {
|
||
if (!it3.hasNext()) {
|
||
break;
|
||
}
|
||
CampaignEx next2 = it3.next();
|
||
if (next2 != null) {
|
||
String requestId2 = next2.getRequestId();
|
||
if (!TextUtils.isEmpty(requestId2)) {
|
||
for (int i2 = 0; i2 < a6.size(); i2++) {
|
||
CampaignEx campaignEx4 = a6.get(i2);
|
||
if (campaignEx4 != null) {
|
||
if (requestId2.equals(campaignEx4.getRequestId())) {
|
||
break;
|
||
} else if (i2 == a6.size() - 1) {
|
||
arrayList2.add(next2);
|
||
}
|
||
}
|
||
}
|
||
if (a6.size() == 0) {
|
||
arrayList2.add(next2);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
this.m.a(arrayList2);
|
||
}
|
||
this.m.a(cVar9.a(), false, true);
|
||
copyOnWriteArrayList3 = new CopyOnWriteArrayList<>(cVar9.a());
|
||
}
|
||
} else {
|
||
aVar = aVar4;
|
||
copyOnWriteArrayList3 = a(str, a3);
|
||
if (copyOnWriteArrayList3.size() > 0) {
|
||
com.mbridge.msdk.foundation.db.b.a(com.mbridge.msdk.foundation.controller.c.m().c()).a(str, copyOnWriteArrayList3);
|
||
}
|
||
cVar9.d("cb is closed 2");
|
||
cVar9.a(com.mbridge.msdk.foundation.b.c.c);
|
||
}
|
||
aVar.a(cVar, str, cVar9, (List<a.C0195a>) null, (JSONObject) null, 1);
|
||
if (copyOnWriteArrayList3 != null && copyOnWriteArrayList3.size() > 0) {
|
||
a(copyOnWriteArrayList3, str, cVar);
|
||
if (this.m != null && !aVar.a(str)) {
|
||
this.m.a(copyOnWriteArrayList3);
|
||
}
|
||
}
|
||
} catch (Exception e4) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e4.getMessage());
|
||
}
|
||
}
|
||
this.Y = false;
|
||
this.q.a(this.E);
|
||
a(this.P, z, str, cVar);
|
||
return;
|
||
}
|
||
com.mbridge.msdk.videocommon.a.a.a().a(this.s, str);
|
||
if (!z || this.q == null) {
|
||
return;
|
||
}
|
||
String a7 = com.mbridge.msdk.foundation.c.a.a(880019, "");
|
||
com.mbridge.msdk.foundation.c.b b3 = com.mbridge.msdk.foundation.c.a.b(880019, "");
|
||
if (cVar != null) {
|
||
cVar.a(b3);
|
||
cVar.c(true);
|
||
}
|
||
c.a(this.q, a7, cVar);
|
||
}
|
||
}
|
||
|
||
private void a(CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList, String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
if (copyOnWriteArrayList == null || copyOnWriteArrayList.size() <= 0) {
|
||
return;
|
||
}
|
||
try {
|
||
e eVar = new e();
|
||
eVar.a("cache", 1);
|
||
cVar.a("2000127", eVar);
|
||
cVar.a("2000048", eVar);
|
||
cVar.a(copyOnWriteArrayList);
|
||
} catch (Exception e2) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
this.Y = true;
|
||
this.q.a(this.E);
|
||
c.a(this.q, this.v, this.s, cVar);
|
||
CampaignEx campaignEx = copyOnWriteArrayList.get(0);
|
||
a(campaignEx.getRequestId(), str);
|
||
com.mbridge.msdk.reward.adapter.c cVar2 = this.m;
|
||
if (cVar2 != null && cVar2.a(copyOnWriteArrayList, true ^ TextUtils.isEmpty(campaignEx.getCMPTEntryUrl()), campaignEx.getNscpt())) {
|
||
a(copyOnWriteArrayList);
|
||
this.q.b(this.v, this.s, cVar);
|
||
} else {
|
||
a(copyOnWriteArrayList, this.m);
|
||
}
|
||
}
|
||
|
||
private CopyOnWriteArrayList<CampaignEx> a(String str, List<CampaignEx> list) {
|
||
CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList = new CopyOnWriteArrayList<>();
|
||
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
||
LinkedHashMap linkedHashMap2 = new LinkedHashMap();
|
||
if (list != null) {
|
||
try {
|
||
if (list.size() > 0) {
|
||
int i = 1;
|
||
for (CampaignEx campaignEx : list) {
|
||
if (campaignEx != null) {
|
||
if (campaignEx.getVcn() > i) {
|
||
i = campaignEx.getVcn();
|
||
}
|
||
if (campaignEx.getTokenRule() == 1) {
|
||
String requestId = campaignEx.getRequestId();
|
||
if (!TextUtils.isEmpty(requestId)) {
|
||
if (linkedHashMap.containsKey(requestId)) {
|
||
List list2 = (List) linkedHashMap.get(requestId);
|
||
if (list2 != null) {
|
||
list2.add(campaignEx);
|
||
}
|
||
} else {
|
||
ArrayList arrayList = new ArrayList();
|
||
arrayList.add(campaignEx);
|
||
linkedHashMap.put(requestId, arrayList);
|
||
}
|
||
}
|
||
} else {
|
||
String requestId2 = campaignEx.getRequestId();
|
||
if (!TextUtils.isEmpty(requestId2)) {
|
||
if (linkedHashMap2.containsKey(requestId2)) {
|
||
List list3 = (List) linkedHashMap2.get(requestId2);
|
||
if (list3 != null) {
|
||
list3.add(campaignEx);
|
||
}
|
||
} else {
|
||
ArrayList arrayList2 = new ArrayList();
|
||
arrayList2.add(campaignEx);
|
||
linkedHashMap2.put(requestId2, arrayList2);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if (linkedHashMap2.size() + linkedHashMap.size() >= i && linkedHashMap.size() > 0 && linkedHashMap.entrySet() != null && linkedHashMap.entrySet().iterator() != null && linkedHashMap.entrySet().iterator().next() != null && ((Map.Entry) linkedHashMap.entrySet().iterator().next()).getValue() != null) {
|
||
copyOnWriteArrayList.addAll((Collection) ((Map.Entry) linkedHashMap.entrySet().iterator().next()).getValue());
|
||
com.mbridge.msdk.foundation.same.a.b.a(this.s, str, i);
|
||
}
|
||
}
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
}
|
||
}
|
||
}
|
||
return copyOnWriteArrayList;
|
||
}
|
||
|
||
private void a(CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList, com.mbridge.msdk.reward.adapter.c cVar) {
|
||
CampaignEx campaignEx = copyOnWriteArrayList.get(0);
|
||
boolean z = !TextUtils.isEmpty(campaignEx.getCMPTEntryUrl());
|
||
int nscpt = campaignEx.getNscpt();
|
||
this.g = false;
|
||
this.h = false;
|
||
this.i = false;
|
||
this.j = false;
|
||
this.k = false;
|
||
com.mbridge.msdk.reward.adapter.b.a().a(this.l, z, nscpt, this.E, this.D ? 287 : 94, this.v, this.s, campaignEx.getRequestId(), copyOnWriteArrayList, new AnonymousClass2(campaignEx, z, cVar, nscpt), new b.i(campaignEx, copyOnWriteArrayList, z, nscpt) { // from class: com.mbridge.msdk.reward.b.a.3
|
||
com.mbridge.msdk.foundation.same.report.d.c a;
|
||
final /* synthetic */ CampaignEx b;
|
||
final /* synthetic */ CopyOnWriteArrayList c;
|
||
final /* synthetic */ boolean d;
|
||
final /* synthetic */ int e;
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.i
|
||
public final void a(String str, String str2, String str3, String str4) {
|
||
}
|
||
|
||
{
|
||
this.b = campaignEx;
|
||
this.c = copyOnWriteArrayList;
|
||
this.d = z;
|
||
this.e = nscpt;
|
||
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, String str2, com.mbridge.msdk.foundation.c.b bVar) {
|
||
String unitId = bVar == null ? "" : bVar.d().getUnitId();
|
||
a aVar = a.this;
|
||
a.a(aVar, unitId, aVar.aa);
|
||
if (bVar != null) {
|
||
bVar.a("errorCode: 3202 errorMessage: temp resource download failed");
|
||
}
|
||
if (this.a == null) {
|
||
this.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
this.a.b(this.c);
|
||
this.a.a(bVar);
|
||
if (!this.d && a.this.q != null) {
|
||
if (a.this.j) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
c.a(a.this.q, bVar, this.a);
|
||
return;
|
||
}
|
||
if (this.e != 1 || a.this.j || a.this.q == null) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
c.a(a.this.q, bVar, this.a);
|
||
}
|
||
});
|
||
if (z) {
|
||
com.mbridge.msdk.reward.adapter.b.a().a(this.l, campaignEx, this.v, this.s, campaignEx.getRequestId(), new AnonymousClass4(campaignEx, copyOnWriteArrayList, cVar, z, nscpt));
|
||
}
|
||
}
|
||
|
||
/* renamed from: com.mbridge.msdk.reward.b.a$2, reason: invalid class name */
|
||
public class AnonymousClass2 implements b.c {
|
||
com.mbridge.msdk.foundation.same.report.d.c a;
|
||
final /* synthetic */ CampaignEx b;
|
||
final /* synthetic */ boolean c;
|
||
final /* synthetic */ com.mbridge.msdk.reward.adapter.c d;
|
||
final /* synthetic */ int e;
|
||
|
||
public AnonymousClass2(CampaignEx campaignEx, boolean z, com.mbridge.msdk.reward.adapter.c cVar, int i) {
|
||
this.b = campaignEx;
|
||
this.c = z;
|
||
this.d = cVar;
|
||
this.e = 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) {
|
||
a.this.g = 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) && a.this.y != null) {
|
||
a.this.y.post(new Runnable() { // from class: com.mbridge.msdk.reward.b.a.2.1
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
com.mbridge.msdk.reward.adapter.b.a().a(a.this.I, a.this.y, a.this.D, a.this.E, null, next.getRewardTemplateMode().e(), a.this.z, AnonymousClass2.this.b, copyOnWriteArrayList, H5DownLoadManager.getInstance().getH5ResAddress(next.getRewardTemplateMode().e()), str, str2, str3, next.getRequestIdNotice(), a.this.n, new b.j() { // from class: com.mbridge.msdk.reward.b.a.2.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) {
|
||
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
|
||
AnonymousClass2 anonymousClass2 = AnonymousClass2.this;
|
||
com.mbridge.msdk.reward.adapter.c cVar = anonymousClass2.d;
|
||
if (cVar != null && cVar.a(copyOnWriteArrayList, anonymousClass2.c, anonymousClass2.e)) {
|
||
if (a.this.q == null || a.this.k) {
|
||
return;
|
||
}
|
||
a.this.k = true;
|
||
AnonymousClass1 anonymousClass12 = AnonymousClass1.this;
|
||
a.this.a(copyOnWriteArrayList);
|
||
a.this.q.b(str5, str6, AnonymousClass2.this.a);
|
||
return;
|
||
}
|
||
a aVar = a.this;
|
||
a.a(aVar, str6, aVar.aa);
|
||
if (a.this.q == null || a.this.j) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
com.mbridge.msdk.foundation.c.b b = com.mbridge.msdk.foundation.c.a.b(880015, "errorCode: 3502 errorMessage: temp preload success but isReady false");
|
||
AnonymousClass2 anonymousClass22 = AnonymousClass2.this;
|
||
if (anonymousClass22.a == null) {
|
||
anonymousClass22.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass1 anonymousClass13 = AnonymousClass1.this;
|
||
AnonymousClass2.this.a.b(copyOnWriteArrayList);
|
||
AnonymousClass2.this.a.a(b);
|
||
c.a(a.this.q, b, AnonymousClass2.this.a);
|
||
}
|
||
|
||
@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 bVar) {
|
||
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
|
||
a aVar = a.this;
|
||
a.a(aVar, str2, aVar.aa);
|
||
if (a.this.q == null || a.this.j) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
bVar.a("errorCode: 3301 errorMessage: temp preload failed");
|
||
AnonymousClass2 anonymousClass2 = AnonymousClass2.this;
|
||
if (anonymousClass2.a == null) {
|
||
anonymousClass2.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass2 anonymousClass22 = AnonymousClass2.this;
|
||
anonymousClass22.a.b(a.this.Z);
|
||
AnonymousClass2.this.a.a(bVar);
|
||
c.a(a.this.q, bVar, AnonymousClass2.this.a);
|
||
}
|
||
});
|
||
}
|
||
});
|
||
} else {
|
||
com.mbridge.msdk.reward.adapter.c cVar = this.d;
|
||
if (cVar == null || !cVar.a(copyOnWriteArrayList, this.c, this.e)) {
|
||
a aVar = a.this;
|
||
a.a(aVar, str2, aVar.aa);
|
||
if (a.this.q != null && !a.this.j) {
|
||
a.this.j = 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(a.this.Z);
|
||
this.a.a(b);
|
||
c.a(a.this.q, b, this.a);
|
||
}
|
||
} else if (a.this.q != null && !a.this.k) {
|
||
a.this.k = true;
|
||
af.a("RewardVideoController", "Cache onVideoLoadSuccessForCache");
|
||
a.this.a(copyOnWriteArrayList);
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar2 = this.a;
|
||
if (cVar2 != null) {
|
||
cVar2.b(copyOnWriteArrayList);
|
||
}
|
||
a.this.q.b(str, str2, this.a);
|
||
}
|
||
}
|
||
}
|
||
return;
|
||
}
|
||
if (!a.this.h || a.this.i || a.this.y == null) {
|
||
return;
|
||
}
|
||
a.this.i = true;
|
||
a.this.y.post(new Runnable() { // from class: com.mbridge.msdk.reward.b.a.2.2
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
com.mbridge.msdk.reward.adapter.b.a().a(a.this.I, a.this.y, a.this.D, a.this.E, str3, AnonymousClass2.this.b.getRequestIdNotice(), str, str2, AnonymousClass2.this.b.getCMPTEntryUrl(), a.this.z, AnonymousClass2.this.b, copyOnWriteArrayList, H5DownLoadManager.getInstance().getH5ResAddress(AnonymousClass2.this.b.getCMPTEntryUrl()), str2, a.this.n, new b.j() { // from class: com.mbridge.msdk.reward.b.a.2.2.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) {
|
||
RunnableC02292 runnableC02292 = RunnableC02292.this;
|
||
AnonymousClass2 anonymousClass2 = AnonymousClass2.this;
|
||
com.mbridge.msdk.reward.adapter.c cVar3 = anonymousClass2.d;
|
||
if (cVar3 != null && cVar3.a(copyOnWriteArrayList, anonymousClass2.c, anonymousClass2.e)) {
|
||
if (a.this.q == null || a.this.k) {
|
||
return;
|
||
}
|
||
a.this.k = true;
|
||
af.a("RewardVideoController", "Cache onVideoLoadSuccessForCache");
|
||
RunnableC02292 runnableC022922 = RunnableC02292.this;
|
||
a.this.a(copyOnWriteArrayList);
|
||
RunnableC02292 runnableC022923 = RunnableC02292.this;
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar4 = AnonymousClass2.this.a;
|
||
if (cVar4 != null) {
|
||
cVar4.b(copyOnWriteArrayList);
|
||
}
|
||
a.this.q.b(str5, str6, AnonymousClass2.this.a);
|
||
return;
|
||
}
|
||
a aVar2 = a.this;
|
||
a.a(aVar2, str6, aVar2.aa);
|
||
if (a.this.q == null || a.this.j) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880015, "errorCode: 3504 errorMessage: tpl temp preload success but isReady false");
|
||
AnonymousClass2 anonymousClass22 = AnonymousClass2.this;
|
||
if (anonymousClass22.a == null) {
|
||
anonymousClass22.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass2.this.a.a(b2);
|
||
RunnableC02292 runnableC022924 = RunnableC02292.this;
|
||
AnonymousClass2.this.a.b(copyOnWriteArrayList);
|
||
c.a(a.this.q, b2, AnonymousClass2.this.a);
|
||
}
|
||
|
||
@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 bVar) {
|
||
RunnableC02292 runnableC02292 = RunnableC02292.this;
|
||
a aVar2 = a.this;
|
||
a.a(aVar2, str2, aVar2.aa);
|
||
if (a.this.q == null || a.this.j) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
if (bVar != null) {
|
||
bVar.a("errorCode: 3302 errorMessage: tpl preload failed");
|
||
}
|
||
AnonymousClass2 anonymousClass2 = AnonymousClass2.this;
|
||
if (anonymousClass2.a == null) {
|
||
anonymousClass2.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
RunnableC02292 runnableC022922 = RunnableC02292.this;
|
||
AnonymousClass2.this.a.b(copyOnWriteArrayList);
|
||
AnonymousClass2.this.a.a(bVar);
|
||
c.a(a.this.q, bVar, AnonymousClass2.this.a);
|
||
}
|
||
}, true);
|
||
}
|
||
});
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.c
|
||
public final void a(CopyOnWriteArrayList<CampaignEx> copyOnWriteArrayList, com.mbridge.msdk.foundation.c.b bVar) {
|
||
a.this.g = false;
|
||
a aVar = a.this;
|
||
a.a(aVar, aVar.s, a.this.aa);
|
||
if (a.this.q == null || a.this.j) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
if (this.a == null) {
|
||
this.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
this.a.b(copyOnWriteArrayList);
|
||
if (bVar != null) {
|
||
bVar.a("errorCode: 3201 errorMessage: campaign resource download failed");
|
||
}
|
||
this.a.a(bVar);
|
||
c.a(a.this.q, bVar, this.a);
|
||
}
|
||
}
|
||
|
||
/* renamed from: com.mbridge.msdk.reward.b.a$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 */ CopyOnWriteArrayList c;
|
||
final /* synthetic */ com.mbridge.msdk.reward.adapter.c d;
|
||
final /* synthetic */ boolean e;
|
||
final /* synthetic */ int f;
|
||
|
||
public AnonymousClass4(CampaignEx campaignEx, CopyOnWriteArrayList copyOnWriteArrayList, com.mbridge.msdk.reward.adapter.c cVar, boolean z, int i) {
|
||
this.b = campaignEx;
|
||
this.c = copyOnWriteArrayList;
|
||
this.d = cVar;
|
||
this.e = z;
|
||
this.f = 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) {
|
||
a.this.h = true;
|
||
if (!a.this.g || a.this.i || a.this.y == null) {
|
||
return;
|
||
}
|
||
a.this.i = true;
|
||
a.this.y.post(new Runnable() { // from class: com.mbridge.msdk.reward.b.a.4.1
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
com.mbridge.msdk.reward.adapter.b a = com.mbridge.msdk.reward.adapter.b.a();
|
||
boolean z = a.this.I;
|
||
Handler handler = a.this.y;
|
||
boolean z2 = a.this.D;
|
||
boolean z3 = a.this.E;
|
||
String str5 = str3;
|
||
String requestIdNotice = AnonymousClass4.this.b.getRequestIdNotice();
|
||
String str6 = str;
|
||
String str7 = str2;
|
||
String cMPTEntryUrl = AnonymousClass4.this.b.getCMPTEntryUrl();
|
||
int i = a.this.z;
|
||
AnonymousClass4 anonymousClass4 = AnonymousClass4.this;
|
||
a.a(z, handler, z2, z3, str5, requestIdNotice, str6, str7, cMPTEntryUrl, i, anonymousClass4.b, anonymousClass4.c, H5DownLoadManager.getInstance().getH5ResAddress(AnonymousClass4.this.b.getCMPTEntryUrl()), str2, a.this.n, new b.j() { // from class: com.mbridge.msdk.reward.b.a.4.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) {
|
||
AnonymousClass4 anonymousClass42 = AnonymousClass4.this;
|
||
com.mbridge.msdk.reward.adapter.c cVar = anonymousClass42.d;
|
||
if (cVar != null && cVar.a(anonymousClass42.c, anonymousClass42.e, anonymousClass42.f)) {
|
||
if (a.this.q == null || a.this.k) {
|
||
return;
|
||
}
|
||
a.this.k = true;
|
||
af.a("RewardVideoController", "Cache onVideoLoadSuccess");
|
||
AnonymousClass4 anonymousClass43 = AnonymousClass4.this;
|
||
a.this.a(anonymousClass43.c);
|
||
AnonymousClass4 anonymousClass44 = AnonymousClass4.this;
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar2 = anonymousClass44.a;
|
||
if (cVar2 != null) {
|
||
cVar2.b(anonymousClass44.c);
|
||
}
|
||
a.this.q.b(str9, str10, AnonymousClass4.this.a);
|
||
return;
|
||
}
|
||
a aVar = a.this;
|
||
a.a(aVar, str10, aVar.aa);
|
||
if (a.this.q == null || a.this.j) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
com.mbridge.msdk.foundation.c.b b = com.mbridge.msdk.foundation.c.a.b(880015, "errorCode: 3505 errorMessage: tpl temp preload success but isReady false");
|
||
AnonymousClass4 anonymousClass45 = AnonymousClass4.this;
|
||
if (anonymousClass45.a == null) {
|
||
anonymousClass45.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass4 anonymousClass46 = AnonymousClass4.this;
|
||
anonymousClass46.a.b(anonymousClass46.c);
|
||
AnonymousClass4.this.a.a(b);
|
||
c.a(a.this.q, b, AnonymousClass4.this.a);
|
||
}
|
||
|
||
@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 bVar) {
|
||
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
|
||
a aVar = a.this;
|
||
a.a(aVar, str2, aVar.aa);
|
||
if (a.this.q == null || a.this.j) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
if (bVar != null) {
|
||
bVar.a("errorCode: 3303 errorMessage: tpl temp preload failed");
|
||
}
|
||
AnonymousClass4 anonymousClass42 = AnonymousClass4.this;
|
||
if (anonymousClass42.a == null) {
|
||
anonymousClass42.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
AnonymousClass4 anonymousClass43 = AnonymousClass4.this;
|
||
anonymousClass43.a.b(anonymousClass43.c);
|
||
AnonymousClass4.this.a.a(bVar);
|
||
c.a(a.this.q, bVar, AnonymousClass4.this.a);
|
||
}
|
||
}, true);
|
||
}
|
||
});
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.b.i
|
||
public final void a(String str, String str2, com.mbridge.msdk.foundation.c.b bVar) {
|
||
String str3;
|
||
if (bVar != null) {
|
||
str3 = bVar.d().getUnitId();
|
||
bVar.a("errorCode: 3203 errorMessage: tpl temp resource download failed");
|
||
} else {
|
||
str3 = "";
|
||
}
|
||
a aVar = a.this;
|
||
a.a(aVar, str3, aVar.aa);
|
||
if (this.a == null) {
|
||
this.a = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
this.a.a(bVar);
|
||
this.a.b(this.c);
|
||
a.this.h = false;
|
||
if (a.this.q == null || a.this.j) {
|
||
return;
|
||
}
|
||
a.this.j = true;
|
||
c.a(a.this.q, bVar, this.a);
|
||
}
|
||
}
|
||
|
||
/* JADX WARN: Removed duplicated region for block: B:26:0x009c */
|
||
/* JADX WARN: Removed duplicated region for block: B:28:? A[RETURN, SYNTHETIC] */
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
private boolean c(java.lang.String r5, java.lang.String r6) {
|
||
/*
|
||
r4 = this;
|
||
com.mbridge.msdk.reward.adapter.c r0 = r4.m // Catch: java.lang.Exception -> Lf
|
||
if (r0 == 0) goto L11
|
||
java.lang.String r0 = r0.a() // Catch: java.lang.Exception -> Lf
|
||
boolean r0 = r5.equals(r0) // Catch: java.lang.Exception -> Lf
|
||
if (r0 != 0) goto L28
|
||
goto L11
|
||
Lf:
|
||
r0 = move-exception
|
||
goto L37
|
||
L11:
|
||
com.mbridge.msdk.reward.adapter.c r0 = new com.mbridge.msdk.reward.adapter.c // Catch: java.lang.Exception -> Lf
|
||
android.content.Context r1 = r4.l // Catch: java.lang.Exception -> Lf
|
||
java.lang.String r2 = r4.v // Catch: java.lang.Exception -> Lf
|
||
r0.<init>(r1, r2, r5) // Catch: java.lang.Exception -> Lf
|
||
r4.m = r0 // Catch: java.lang.Exception -> Lf
|
||
boolean r1 = r4.D // Catch: java.lang.Exception -> Lf
|
||
r0.b(r1) // Catch: java.lang.Exception -> Lf
|
||
com.mbridge.msdk.reward.adapter.c r0 = r4.m // Catch: java.lang.Exception -> Lf
|
||
boolean r1 = r4.E // Catch: java.lang.Exception -> Lf
|
||
r0.c(r1) // Catch: java.lang.Exception -> Lf
|
||
L28:
|
||
com.mbridge.msdk.reward.adapter.c r0 = r4.m // Catch: java.lang.Exception -> Lf
|
||
int r1 = r4.z // Catch: java.lang.Exception -> Lf
|
||
r0.a(r1) // Catch: java.lang.Exception -> Lf
|
||
com.mbridge.msdk.reward.adapter.c r0 = r4.m // Catch: java.lang.Exception -> Lf
|
||
com.mbridge.msdk.videocommon.d.c r1 = r4.n // Catch: java.lang.Exception -> Lf
|
||
r0.a(r1) // Catch: java.lang.Exception -> Lf
|
||
goto L44
|
||
L37:
|
||
boolean r1 = com.mbridge.msdk.MBridgeConstans.DEBUG
|
||
if (r1 == 0) goto L44
|
||
java.lang.String r1 = "RewardVideoController"
|
||
java.lang.String r0 = r0.getMessage()
|
||
com.mbridge.msdk.foundation.tools.af.b(r1, r0)
|
||
L44:
|
||
com.mbridge.msdk.videocommon.a.a r0 = com.mbridge.msdk.videocommon.a.a.a()
|
||
boolean r1 = r4.E
|
||
r2 = 1
|
||
java.util.List r0 = r0.a(r5, r2, r1)
|
||
com.mbridge.msdk.videocommon.a.a r1 = com.mbridge.msdk.videocommon.a.a.a()
|
||
boolean r3 = r4.E
|
||
java.util.List r1 = r1.b(r5, r2, r3)
|
||
r4.aa = r1
|
||
if (r0 == 0) goto L98
|
||
int r1 = r0.size()
|
||
if (r1 <= 0) goto L98
|
||
com.mbridge.msdk.videocommon.a.a r1 = com.mbridge.msdk.videocommon.a.a.a()
|
||
r1.a(r5, r0, r6)
|
||
java.util.concurrent.CopyOnWriteArrayList<com.mbridge.msdk.foundation.entity.CampaignEx> r5 = r4.Z
|
||
if (r5 != 0) goto L76
|
||
java.util.concurrent.CopyOnWriteArrayList r5 = new java.util.concurrent.CopyOnWriteArrayList
|
||
r5.<init>()
|
||
r4.Z = r5
|
||
goto L79
|
||
L76:
|
||
r5.clear()
|
||
L79:
|
||
java.util.Iterator r5 = r0.iterator()
|
||
L7d:
|
||
boolean r0 = r5.hasNext()
|
||
if (r0 == 0) goto L92
|
||
java.lang.Object r0 = r5.next()
|
||
com.mbridge.msdk.foundation.entity.CampaignEx r0 = (com.mbridge.msdk.foundation.entity.CampaignEx) r0
|
||
r0.setLocalRequestId(r6)
|
||
java.util.concurrent.CopyOnWriteArrayList<com.mbridge.msdk.foundation.entity.CampaignEx> r1 = r4.Z
|
||
r1.add(r0)
|
||
goto L7d
|
||
L92:
|
||
java.util.concurrent.CopyOnWriteArrayList<com.mbridge.msdk.foundation.entity.CampaignEx> r5 = r4.Z
|
||
r4.a(r5)
|
||
return r2
|
||
L98:
|
||
java.util.concurrent.CopyOnWriteArrayList<com.mbridge.msdk.foundation.entity.CampaignEx> r5 = r4.Z
|
||
if (r5 == 0) goto L9f
|
||
r5.clear()
|
||
L9f:
|
||
r5 = 0
|
||
return r5
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.b.a.c(java.lang.String, java.lang.String):boolean");
|
||
}
|
||
|
||
public final class c {
|
||
private WeakReference<InterVideoOutListener> b;
|
||
private volatile AtomicInteger c;
|
||
private Handler d;
|
||
private String e;
|
||
private boolean f;
|
||
|
||
public final void a(boolean z) {
|
||
this.f = z;
|
||
}
|
||
|
||
private c(InterVideoOutListener interVideoOutListener, Handler handler, String str) {
|
||
this.b = new WeakReference<>(interVideoOutListener);
|
||
this.c = new AtomicInteger(0);
|
||
this.d = handler;
|
||
this.e = str;
|
||
}
|
||
|
||
public final void a(String str, String str2, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
Handler handler = this.d;
|
||
if (handler != null) {
|
||
handler.removeMessages(1001002);
|
||
}
|
||
WeakReference<InterVideoOutListener> weakReference = this.b;
|
||
InterVideoOutListener interVideoOutListener = weakReference != null ? weakReference.get() : null;
|
||
if (this.c.get() == 2 || this.d == null) {
|
||
return;
|
||
}
|
||
this.c.set(2);
|
||
if (a.this.V) {
|
||
return;
|
||
}
|
||
a.this.V = true;
|
||
if (cVar == null) {
|
||
cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
cVar.b(a.this.M);
|
||
a.a(a.this, "2000048", cVar, interVideoOutListener);
|
||
if (interVideoOutListener != null) {
|
||
Message obtain = Message.obtain();
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString(MBridgeConstans.PLACEMENT_ID, str);
|
||
bundle.putString(MBridgeConstans.PROPERTIES_UNIT_ID, str2);
|
||
bundle.putString("metrics_data_lrid", cVar.f());
|
||
obtain.setData(bundle);
|
||
obtain.obj = str2;
|
||
obtain.what = 9;
|
||
this.d.sendMessage(obtain);
|
||
}
|
||
}
|
||
|
||
public final void b(String str, String str2, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
Handler handler = this.d;
|
||
if (handler != null) {
|
||
handler.removeMessages(1001002);
|
||
}
|
||
WeakReference<InterVideoOutListener> weakReference = this.b;
|
||
InterVideoOutListener interVideoOutListener = weakReference != null ? weakReference.get() : null;
|
||
if (this.c.get() == 2 || this.d == null) {
|
||
return;
|
||
}
|
||
if (this.c.get() == 1) {
|
||
this.c.set(3);
|
||
}
|
||
if (a.this.V) {
|
||
return;
|
||
}
|
||
a.this.V = true;
|
||
if (cVar == null) {
|
||
cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
cVar.a(true);
|
||
cVar.b(a.this.M);
|
||
a.a(a.this, "2000048", cVar, interVideoOutListener);
|
||
if (interVideoOutListener != null) {
|
||
Message obtain = Message.obtain();
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString(MBridgeConstans.PLACEMENT_ID, str);
|
||
bundle.putString(MBridgeConstans.PROPERTIES_UNIT_ID, str2);
|
||
bundle.putSerializable("metrics_data_lrid", cVar.f());
|
||
obtain.setData(bundle);
|
||
obtain.obj = str2;
|
||
obtain.what = 9;
|
||
this.d.sendMessage(obtain);
|
||
}
|
||
if (a.this.W) {
|
||
this.c.set(2);
|
||
}
|
||
}
|
||
|
||
public final void a(com.mbridge.msdk.foundation.c.b bVar, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
String str;
|
||
if (bVar == null || cVar == null) {
|
||
str = "";
|
||
} else {
|
||
str = bVar.b();
|
||
cVar.a(bVar);
|
||
}
|
||
if (a.this.m != null) {
|
||
a.this.m.a(a.this.a);
|
||
CopyOnWriteArrayList<CampaignEx> e = a.this.m.e();
|
||
CampaignEx campaignEx = (a.this.M == null || a.this.M.size() == 0) ? null : (CampaignEx) a.this.M.get(0);
|
||
if (campaignEx == null) {
|
||
campaignEx = (e == null || e.size() == 0) ? null : e.get(0);
|
||
}
|
||
CampaignEx campaignEx2 = campaignEx;
|
||
if (a.this.E && ((campaignEx2 == null || TextUtils.isEmpty(campaignEx2.getNLRid())) && ((e == null || e.size() == 0) && a.this.m.a(campaignEx2, true, bVar, 2, cVar)))) {
|
||
return;
|
||
} else {
|
||
a.this.m.a((com.mbridge.msdk.reward.adapter.a) null);
|
||
}
|
||
}
|
||
Handler handler = this.d;
|
||
if (handler != null) {
|
||
handler.removeMessages(1001002);
|
||
}
|
||
WeakReference<InterVideoOutListener> weakReference = this.b;
|
||
InterVideoOutListener interVideoOutListener = weakReference != null ? weakReference.get() : null;
|
||
if (this.c.get() == 2 || this.d == null) {
|
||
return;
|
||
}
|
||
a.this.W = true;
|
||
if (!a.this.Y || str.contains("resource load timeout")) {
|
||
a.this.X = true;
|
||
}
|
||
if (a.this.V) {
|
||
this.c.set(2);
|
||
}
|
||
if (a.this.W && a.this.X && !a.this.V) {
|
||
this.c.set(2);
|
||
a.a(a.this, "2000047", cVar, interVideoOutListener);
|
||
if (interVideoOutListener != null) {
|
||
Message obtain = Message.obtain();
|
||
obtain.obj = str;
|
||
obtain.what = 16;
|
||
if (cVar != null) {
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString("metrics_data_lrid", cVar.f());
|
||
obtain.setData(bundle);
|
||
}
|
||
this.d.sendMessage(obtain);
|
||
}
|
||
}
|
||
}
|
||
|
||
/* JADX INFO: Access modifiers changed from: private */
|
||
public void a(String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
WeakReference<InterVideoOutListener> weakReference = this.b;
|
||
a.a(a.this, "2000047", cVar, weakReference != null ? weakReference.get() : null);
|
||
if (this.d != null) {
|
||
Message obtain = Message.obtain();
|
||
obtain.obj = str;
|
||
obtain.what = 18;
|
||
if (cVar != null) {
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString("metrics_data_lrid", cVar.f());
|
||
obtain.setData(bundle);
|
||
}
|
||
this.d.sendMessage(obtain);
|
||
}
|
||
}
|
||
|
||
public static /* synthetic */ int a(c cVar) {
|
||
return cVar.c.get();
|
||
}
|
||
|
||
public static /* synthetic */ void a(c cVar, int i) {
|
||
cVar.c.set(i);
|
||
}
|
||
|
||
public static /* synthetic */ void a(c cVar, String str, com.mbridge.msdk.foundation.same.report.d.c cVar2) {
|
||
cVar.c.set(2);
|
||
cVar.a(str, cVar2);
|
||
}
|
||
|
||
public static /* synthetic */ void a(c cVar, String str, String str2, com.mbridge.msdk.foundation.same.report.d.c cVar2) {
|
||
WeakReference<InterVideoOutListener> weakReference = cVar.b;
|
||
InterVideoOutListener interVideoOutListener = weakReference != null ? weakReference.get() : null;
|
||
if (cVar.d == null || a.this.U) {
|
||
return;
|
||
}
|
||
a.this.U = true;
|
||
a.a(a.this, "2000127", cVar2, interVideoOutListener);
|
||
if (interVideoOutListener != null) {
|
||
Message obtain = Message.obtain();
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString(MBridgeConstans.PLACEMENT_ID, str);
|
||
bundle.putString(MBridgeConstans.PROPERTIES_UNIT_ID, str2);
|
||
bundle.putBoolean(MBridgeConstans.PROPERTIES_IS_CACHED_CAMPAIGN, true);
|
||
if (cVar2 != null) {
|
||
bundle.putString("metrics_data_lrid", cVar2.f());
|
||
}
|
||
obtain.setData(bundle);
|
||
obtain.obj = str2;
|
||
obtain.what = 17;
|
||
cVar.d.sendMessage(obtain);
|
||
if (ah.a().a("l_s_i_l_v_s", false)) {
|
||
cVar.b(str, str2, cVar2);
|
||
}
|
||
}
|
||
}
|
||
|
||
public static /* synthetic */ void a(c cVar, com.mbridge.msdk.foundation.c.b bVar, com.mbridge.msdk.foundation.same.report.d.c cVar2) {
|
||
WeakReference<InterVideoOutListener> weakReference = cVar.b;
|
||
InterVideoOutListener interVideoOutListener = weakReference != null ? weakReference.get() : null;
|
||
if (cVar.c.get() == 2 || cVar.d == null) {
|
||
return;
|
||
}
|
||
a.this.X = true;
|
||
String b = bVar != null ? bVar.b() : "";
|
||
if (b.contains("resource load timeout")) {
|
||
a.this.W = true;
|
||
}
|
||
if (a.this.X && a.this.W && !a.this.V) {
|
||
cVar.c.set(2);
|
||
if (interVideoOutListener != null) {
|
||
Message obtain = Message.obtain();
|
||
obtain.obj = b;
|
||
obtain.what = 16;
|
||
if (cVar2 != null) {
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString("metrics_data_lrid", cVar2.f());
|
||
obtain.setData(bundle);
|
||
}
|
||
cVar.d.sendMessage(obtain);
|
||
}
|
||
if (cVar2 == null) {
|
||
cVar2 = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
}
|
||
cVar2.a(true);
|
||
a.a(a.this, "2000047", cVar2, interVideoOutListener);
|
||
}
|
||
}
|
||
|
||
public static /* synthetic */ void b(c cVar, String str, String str2, com.mbridge.msdk.foundation.same.report.d.c cVar2) {
|
||
WeakReference<InterVideoOutListener> weakReference = cVar.b;
|
||
InterVideoOutListener interVideoOutListener = weakReference != null ? weakReference.get() : null;
|
||
if ((cVar.c.get() != 1 && cVar.c.get() != 3) || cVar.d == null || a.this.U) {
|
||
return;
|
||
}
|
||
a.this.U = true;
|
||
a.a(a.this, "2000127", cVar2, interVideoOutListener);
|
||
if (interVideoOutListener != null) {
|
||
Message obtain = Message.obtain();
|
||
Bundle bundle = new Bundle();
|
||
bundle.putString(MBridgeConstans.PLACEMENT_ID, str);
|
||
bundle.putString(MBridgeConstans.PROPERTIES_UNIT_ID, str2);
|
||
bundle.putBoolean(MBridgeConstans.PROPERTIES_IS_CACHED_CAMPAIGN, false);
|
||
if (cVar2 != null) {
|
||
bundle.putString("metrics_data_lrid", cVar2.f());
|
||
}
|
||
obtain.setData(bundle);
|
||
obtain.obj = str2;
|
||
obtain.what = 17;
|
||
cVar.d.sendMessage(obtain);
|
||
if (ah.a().a("l_s_i_l_v_s", false)) {
|
||
cVar.a(str, str2, cVar2);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
private void a(Queue<Integer> queue, boolean z, String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
Integer poll;
|
||
int intValue;
|
||
try {
|
||
if (queue != null) {
|
||
try {
|
||
if (queue.size() > 0 && (poll = queue.poll()) != null) {
|
||
intValue = poll.intValue();
|
||
a(1, intValue, z, str, cVar);
|
||
return;
|
||
}
|
||
} catch (Exception e2) {
|
||
com.mbridge.msdk.foundation.c.b b2 = com.mbridge.msdk.foundation.c.a.b(880020, "load mv api error:" + e2.getMessage());
|
||
if (cVar != null) {
|
||
cVar.a(b2);
|
||
cVar.c(true);
|
||
}
|
||
a(b2, cVar);
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
return;
|
||
}
|
||
return;
|
||
}
|
||
}
|
||
a(1, intValue, z, str, cVar);
|
||
return;
|
||
} catch (Exception e3) {
|
||
com.mbridge.msdk.foundation.c.b b3 = com.mbridge.msdk.foundation.c.a.b(880020, "load mv api error:" + e3.getMessage());
|
||
if (cVar != null) {
|
||
cVar.a(b3);
|
||
cVar.c(true);
|
||
}
|
||
a(b3, cVar);
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e3.getMessage());
|
||
return;
|
||
}
|
||
return;
|
||
}
|
||
intValue = 25;
|
||
}
|
||
|
||
/* JADX INFO: Access modifiers changed from: private */
|
||
public void a(com.mbridge.msdk.foundation.c.b bVar, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
if (this.q != null) {
|
||
this.X = true;
|
||
this.q.a(bVar, cVar);
|
||
}
|
||
}
|
||
|
||
/* JADX WARN: Removed duplicated region for block: B:9:0x0031 A[Catch: Exception -> 0x0011, TryCatch #0 {Exception -> 0x0011, blocks: (B:2:0x0000, B:4:0x0004, B:7:0x002d, B:9:0x0031, B:10:0x003c, B:14:0x0014), top: B:1:0x0000 }] */
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
private void a(int r11, int r12, boolean r13, java.lang.String r14, com.mbridge.msdk.foundation.same.report.d.c r15) {
|
||
/*
|
||
r10 = this;
|
||
com.mbridge.msdk.reward.adapter.c r0 = r10.m // Catch: java.lang.Exception -> L11
|
||
if (r0 == 0) goto L14
|
||
java.lang.String r1 = r10.s // Catch: java.lang.Exception -> L11
|
||
java.lang.String r0 = r0.a() // Catch: java.lang.Exception -> L11
|
||
boolean r0 = r1.equals(r0) // Catch: java.lang.Exception -> L11
|
||
if (r0 != 0) goto L2d
|
||
goto L14
|
||
L11:
|
||
r11 = move-exception
|
||
goto L82
|
||
L14:
|
||
com.mbridge.msdk.reward.adapter.c r0 = new com.mbridge.msdk.reward.adapter.c // Catch: java.lang.Exception -> L11
|
||
android.content.Context r1 = r10.l // Catch: java.lang.Exception -> L11
|
||
java.lang.String r2 = r10.v // Catch: java.lang.Exception -> L11
|
||
java.lang.String r3 = r10.s // Catch: java.lang.Exception -> L11
|
||
r0.<init>(r1, r2, r3) // Catch: java.lang.Exception -> L11
|
||
r10.m = r0 // Catch: java.lang.Exception -> L11
|
||
boolean r1 = r10.D // Catch: java.lang.Exception -> L11
|
||
r0.b(r1) // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.reward.adapter.c r0 = r10.m // Catch: java.lang.Exception -> L11
|
||
boolean r1 = r10.E // Catch: java.lang.Exception -> L11
|
||
r0.c(r1) // Catch: java.lang.Exception -> L11
|
||
L2d:
|
||
boolean r0 = r10.D // Catch: java.lang.Exception -> L11
|
||
if (r0 == 0) goto L3c
|
||
com.mbridge.msdk.reward.adapter.c r0 = r10.m // Catch: java.lang.Exception -> L11
|
||
int r1 = r10.A // Catch: java.lang.Exception -> L11
|
||
int r2 = r10.B // Catch: java.lang.Exception -> L11
|
||
int r3 = r10.C // Catch: java.lang.Exception -> L11
|
||
r0.a(r1, r2, r3) // Catch: java.lang.Exception -> L11
|
||
L3c:
|
||
com.mbridge.msdk.reward.adapter.c r0 = r10.m // Catch: java.lang.Exception -> L11
|
||
int r1 = r10.z // Catch: java.lang.Exception -> L11
|
||
r0.a(r1) // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.reward.adapter.c r0 = r10.m // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.videocommon.d.c r1 = r10.n // Catch: java.lang.Exception -> L11
|
||
r0.a(r1) // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.reward.b.a$a r0 = new com.mbridge.msdk.reward.b.a$a // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.reward.adapter.c r4 = r10.m // Catch: java.lang.Exception -> L11
|
||
r2 = r0
|
||
r3 = r10
|
||
r5 = r11
|
||
r6 = r13
|
||
r7 = r14
|
||
r8 = r15
|
||
r2.<init>(r4, r5, r6, r7, r8) // Catch: java.lang.Exception -> L11
|
||
r0.a(r12) // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.reward.b.a$b r1 = new com.mbridge.msdk.reward.b.a$b // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.reward.adapter.c r2 = r10.m // Catch: java.lang.Exception -> L11
|
||
r1.<init>(r2, r13) // Catch: java.lang.Exception -> L11
|
||
r10.a = r1 // Catch: java.lang.Exception -> L11
|
||
r1.a(r0) // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.reward.adapter.c r1 = r10.m // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.reward.b.a$b r2 = r10.a // Catch: java.lang.Exception -> L11
|
||
r1.a(r2) // Catch: java.lang.Exception -> L11
|
||
com.mbridge.msdk.reward.adapter.c r3 = r10.m // Catch: java.lang.Exception -> L11
|
||
boolean r8 = r10.I // Catch: java.lang.Exception -> L11
|
||
r4 = r11
|
||
r5 = r12
|
||
r6 = r13
|
||
r7 = r14
|
||
r9 = r15
|
||
r3.a(r4, r5, r6, r7, r8, r9) // Catch: java.lang.Exception -> L11
|
||
android.os.Handler r11 = r10.y // Catch: java.lang.Exception -> L11
|
||
int r12 = r12 * 1000
|
||
long r12 = (long) r12 // Catch: java.lang.Exception -> L11
|
||
r11.postDelayed(r0, r12) // Catch: java.lang.Exception -> L11
|
||
goto La6
|
||
L82:
|
||
r12 = 880020(0xd6d94, float:1.23317E-39)
|
||
java.lang.String r13 = r11.getMessage()
|
||
com.mbridge.msdk.foundation.c.b r12 = com.mbridge.msdk.foundation.c.a.b(r12, r13)
|
||
if (r15 == 0) goto L96
|
||
r15.a(r12)
|
||
r13 = 1
|
||
r15.c(r13)
|
||
L96:
|
||
r10.a(r12, r15)
|
||
boolean r12 = com.mbridge.msdk.MBridgeConstans.DEBUG
|
||
if (r12 == 0) goto La6
|
||
java.lang.String r12 = "RewardVideoController"
|
||
java.lang.String r11 = r11.getMessage()
|
||
com.mbridge.msdk.foundation.tools.af.b(r12, r11)
|
||
La6:
|
||
return
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.b.a.a(int, int, boolean, java.lang.String, com.mbridge.msdk.foundation.same.report.d.c):void");
|
||
}
|
||
|
||
/* JADX WARN: Code restructure failed: missing block: B:43:0x00b7, code lost:
|
||
|
||
if (r16.m.c() != false) goto L38;
|
||
*/
|
||
/* JADX WARN: Removed duplicated region for block: B:107:0x014f A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
||
/* JADX WARN: Removed duplicated region for block: B:81:0x013d */
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
private void a(java.lang.String r17, com.mbridge.msdk.foundation.same.report.d.c r18) {
|
||
/*
|
||
Method dump skipped, instructions count: 411
|
||
To view this dump add '--comments-level debug' option
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.b.a.a(java.lang.String, com.mbridge.msdk.foundation.same.report.d.c):void");
|
||
}
|
||
|
||
public final boolean d(boolean z) {
|
||
try {
|
||
if (s()) {
|
||
if (!z) {
|
||
return false;
|
||
}
|
||
d("is_ready_start", "over cap check error");
|
||
return false;
|
||
}
|
||
if (this.E) {
|
||
try {
|
||
return e(z);
|
||
} catch (Exception e2) {
|
||
if (!MBridgeConstans.DEBUG) {
|
||
return false;
|
||
}
|
||
af.b("RewardVideoController", e2.getMessage());
|
||
return false;
|
||
}
|
||
}
|
||
if (this.m == null) {
|
||
r();
|
||
}
|
||
com.mbridge.msdk.reward.adapter.c cVar = this.m;
|
||
if (cVar != null) {
|
||
return cVar.b();
|
||
}
|
||
return false;
|
||
} catch (Throwable th) {
|
||
if (!MBridgeConstans.DEBUG) {
|
||
return false;
|
||
}
|
||
af.b("RewardVideoController", th.getMessage());
|
||
return false;
|
||
}
|
||
}
|
||
|
||
private boolean e(boolean z) {
|
||
if (z) {
|
||
d("is_ready_start", "");
|
||
}
|
||
if (this.m == null) {
|
||
r();
|
||
}
|
||
List<com.mbridge.msdk.foundation.entity.c> a = com.mbridge.msdk.videocommon.a.a.a().a(this.s);
|
||
if (a == null || a.size() <= 0) {
|
||
if (!z) {
|
||
return false;
|
||
}
|
||
d("is_ready_ctir_false", "no effective campaign list");
|
||
return false;
|
||
}
|
||
String b2 = com.mbridge.msdk.foundation.same.a.b.b(this.s);
|
||
boolean a2 = TextUtils.isEmpty(b2) ? false : a(a, b2);
|
||
if (z) {
|
||
d("is_ready_ctir_" + a2, "");
|
||
}
|
||
if (a2) {
|
||
return a2;
|
||
}
|
||
for (com.mbridge.msdk.foundation.entity.c cVar : a) {
|
||
if (cVar != null) {
|
||
this.m.a(cVar.a());
|
||
this.m.d = cVar.d();
|
||
if (this.m.d(z)) {
|
||
return true;
|
||
}
|
||
}
|
||
}
|
||
return a2;
|
||
}
|
||
|
||
private boolean a(List<com.mbridge.msdk.foundation.entity.c> list, String str) {
|
||
if (list == null) {
|
||
return false;
|
||
}
|
||
for (com.mbridge.msdk.foundation.entity.c cVar : list) {
|
||
if (cVar != null && str.equals(cVar.b())) {
|
||
this.m.a(cVar.a());
|
||
this.m.d = cVar.d();
|
||
if (this.m.b()) {
|
||
return true;
|
||
}
|
||
}
|
||
}
|
||
return false;
|
||
}
|
||
|
||
private void r() {
|
||
com.mbridge.msdk.reward.adapter.c cVar = new com.mbridge.msdk.reward.adapter.c(this.l, this.v, this.s);
|
||
this.m = cVar;
|
||
cVar.b(this.D);
|
||
this.m.c(this.E);
|
||
if (this.D) {
|
||
this.m.a(this.A, this.B, this.C);
|
||
}
|
||
this.m.a(this.n);
|
||
}
|
||
|
||
/* JADX WARN: Removed duplicated region for block: B:135:0x01e4 */
|
||
/* JADX WARN: Removed duplicated region for block: B:161:0x01fa A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
public final void a(java.lang.String r11, java.lang.String r12, java.lang.String r13, com.mbridge.msdk.foundation.same.report.d.e r14) {
|
||
/*
|
||
Method dump skipped, instructions count: 586
|
||
To view this dump add '--comments-level debug' option
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.b.a.a(java.lang.String, java.lang.String, java.lang.String, com.mbridge.msdk.foundation.same.report.d.e):void");
|
||
}
|
||
|
||
private com.mbridge.msdk.foundation.same.report.d.c a(e eVar) {
|
||
CampaignEx campaignEx;
|
||
try {
|
||
CopyOnWriteArrayList<CampaignEx> a = com.mbridge.msdk.videocommon.download.b.getInstance().a(this.s);
|
||
String str = "";
|
||
if (a != null && a.size() > 0 && (campaignEx = a.get(0)) != null) {
|
||
str = campaignEx.getCurrentLocalRid();
|
||
}
|
||
r0 = TextUtils.isEmpty(str) ? null : com.mbridge.msdk.foundation.same.report.d.d.a().b().get(str);
|
||
if (r0 != null) {
|
||
r0.b(a);
|
||
r0.a("2000128", eVar);
|
||
r0.c(str);
|
||
r0.d(this.s);
|
||
com.mbridge.msdk.reward.c.a.a.a().a("2000128", r0);
|
||
return r0;
|
||
}
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
try {
|
||
cVar.d(this.s);
|
||
eVar.a("metrics_data_reason", "未获取到待展示的campaign信息 本地new metricsData");
|
||
cVar.a("2000128", eVar);
|
||
if (TextUtils.isEmpty(str)) {
|
||
cVar.c(SameMD5.getMD5(ak.d()));
|
||
} else {
|
||
cVar.c(str);
|
||
cVar.b(a);
|
||
com.mbridge.msdk.foundation.same.report.d.d.a().b().put(str, cVar);
|
||
}
|
||
com.mbridge.msdk.reward.c.a.a.a().a("2000128", cVar);
|
||
return cVar;
|
||
} catch (Exception e2) {
|
||
e = e2;
|
||
r0 = cVar;
|
||
if (MBridgeConstans.DEBUG) {
|
||
af.b("RewardVideoController", e.getMessage());
|
||
}
|
||
return r0;
|
||
}
|
||
} catch (Exception e3) {
|
||
e = e3;
|
||
}
|
||
}
|
||
|
||
private boolean s() {
|
||
try {
|
||
if (this.R == null) {
|
||
this.R = g.a(com.mbridge.msdk.foundation.controller.c.m().c());
|
||
}
|
||
com.mbridge.msdk.foundation.db.h a = com.mbridge.msdk.foundation.db.h.a(this.R);
|
||
if (this.n == null) {
|
||
this.n = com.mbridge.msdk.videocommon.d.b.a().a(com.mbridge.msdk.foundation.controller.c.m().k(), this.s, this.D);
|
||
}
|
||
int d2 = this.n.d();
|
||
if (a != null) {
|
||
return a.a(this.s, d2);
|
||
}
|
||
return false;
|
||
} catch (Throwable unused) {
|
||
af.b("RewardVideoController", "cap check error");
|
||
return false;
|
||
}
|
||
}
|
||
|
||
/* renamed from: com.mbridge.msdk.reward.b.a$a, reason: collision with other inner class name */
|
||
public class RunnableC0231a implements Runnable {
|
||
private final com.mbridge.msdk.reward.adapter.c b;
|
||
private final int c;
|
||
private final boolean d;
|
||
private boolean e = false;
|
||
private int f;
|
||
private String g;
|
||
private com.mbridge.msdk.foundation.same.report.d.c h;
|
||
|
||
public final void a() {
|
||
this.e = true;
|
||
}
|
||
|
||
public final void a(int i) {
|
||
this.f = i;
|
||
}
|
||
|
||
public RunnableC0231a(com.mbridge.msdk.reward.adapter.c cVar, int i, boolean z, String str, com.mbridge.msdk.foundation.same.report.d.c cVar2) {
|
||
this.b = cVar;
|
||
this.c = i;
|
||
this.d = z;
|
||
if (cVar != null) {
|
||
cVar.e(false);
|
||
}
|
||
this.g = str;
|
||
this.h = cVar2;
|
||
}
|
||
|
||
@Override // java.lang.Runnable
|
||
public final void run() {
|
||
if (this.e) {
|
||
return;
|
||
}
|
||
com.mbridge.msdk.reward.adapter.c cVar = this.b;
|
||
if (cVar != null) {
|
||
cVar.e(true);
|
||
}
|
||
af.b("RewardVideoController", "adSource=" + this.c + " CommonCancelTimeTask mIsDevCall:" + this.d);
|
||
a.this.a(com.mbridge.msdk.foundation.c.a.b(880023, "v3 is timeout"), this.h);
|
||
}
|
||
}
|
||
|
||
public class b implements com.mbridge.msdk.reward.adapter.a {
|
||
private com.mbridge.msdk.reward.adapter.c b;
|
||
private boolean c;
|
||
private RunnableC0231a d;
|
||
|
||
public final void a(RunnableC0231a runnableC0231a) {
|
||
this.d = runnableC0231a;
|
||
}
|
||
|
||
public b(com.mbridge.msdk.reward.adapter.c cVar, boolean z) {
|
||
this.b = cVar;
|
||
this.c = z;
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.a
|
||
public final void a(String str, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
RunnableC0231a runnableC0231a = this.d;
|
||
if (runnableC0231a != null) {
|
||
runnableC0231a.a();
|
||
a.this.y.removeCallbacks(this.d);
|
||
}
|
||
if (a.this.q != null) {
|
||
c.b(a.this.q, a.this.v, a.this.s, cVar);
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.a
|
||
public final void a(List<CampaignEx> list, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
RunnableC0231a runnableC0231a = this.d;
|
||
if (runnableC0231a != null) {
|
||
runnableC0231a.a();
|
||
a.this.y.removeCallbacks(this.d);
|
||
}
|
||
a.this.a(list);
|
||
if (a.this.q != null) {
|
||
a.this.q.a(a.this.v, a.this.s, cVar);
|
||
}
|
||
}
|
||
|
||
@Override // com.mbridge.msdk.reward.adapter.a
|
||
public final void a(List<CampaignEx> list, com.mbridge.msdk.foundation.c.b bVar, com.mbridge.msdk.foundation.same.report.d.c cVar) {
|
||
RunnableC0231a runnableC0231a = this.d;
|
||
if (runnableC0231a != null) {
|
||
runnableC0231a.a();
|
||
a.this.y.removeCallbacks(this.d);
|
||
}
|
||
com.mbridge.msdk.reward.adapter.c cVar2 = this.b;
|
||
if (cVar2 != null) {
|
||
cVar2.a((com.mbridge.msdk.reward.adapter.a) null);
|
||
this.b = null;
|
||
}
|
||
a.this.a(list);
|
||
if (a.this.q != null) {
|
||
a.this.q.a(bVar, cVar);
|
||
}
|
||
}
|
||
}
|
||
|
||
public final void a(List<CampaignEx> list) {
|
||
if (list == null || list.size() <= 0) {
|
||
return;
|
||
}
|
||
this.M = list;
|
||
}
|
||
|
||
public final String d() {
|
||
com.mbridge.msdk.reward.adapter.c cVar = this.m;
|
||
return cVar != null ? cVar.f() : "";
|
||
}
|
||
|
||
private String a(String str) {
|
||
try {
|
||
String md5 = TextUtils.isEmpty(str) ? SameMD5.getMD5(ak.d()) : "";
|
||
String[] split = str.split("_");
|
||
if (split != null && split.length >= 3) {
|
||
md5 = split[2];
|
||
}
|
||
return TextUtils.isEmpty(md5) ? SameMD5.getMD5(ak.d()) : md5;
|
||
} catch (Exception e2) {
|
||
if (!MBridgeConstans.DEBUG) {
|
||
return "";
|
||
}
|
||
e2.printStackTrace();
|
||
return "";
|
||
}
|
||
}
|
||
|
||
public final com.mbridge.msdk.foundation.same.report.d.c a(Message message) {
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar = null;
|
||
if (message != null) {
|
||
try {
|
||
Bundle data = message.getData();
|
||
if (data != null) {
|
||
cVar = com.mbridge.msdk.foundation.same.report.d.d.a().a(data.getString("metrics_data_lrid"), "");
|
||
}
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e2.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
return cVar == null ? new com.mbridge.msdk.foundation.same.report.d.c() : cVar;
|
||
}
|
||
|
||
/* JADX INFO: Access modifiers changed from: private */
|
||
public void a(String str, com.mbridge.msdk.foundation.same.report.d.c cVar, InterVideoOutListener interVideoOutListener, String str2) {
|
||
if (cVar == null) {
|
||
try {
|
||
cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
cVar.b(this.M);
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e2.printStackTrace();
|
||
return;
|
||
}
|
||
return;
|
||
}
|
||
}
|
||
e eVar = new e();
|
||
if (!TextUtils.isEmpty(str2)) {
|
||
eVar.a("reason", str2);
|
||
}
|
||
if (interVideoOutListener != null) {
|
||
eVar.a("listener_state", 1);
|
||
} else {
|
||
eVar.a("listener_state", 2);
|
||
}
|
||
cVar.a(str, eVar);
|
||
com.mbridge.msdk.reward.c.a.a.a().a(str, cVar);
|
||
}
|
||
|
||
/* JADX WARN: Removed duplicated region for block: B:6:0x003f A[RETURN] */
|
||
/* JADX WARN: Removed duplicated region for block: B:8:0x0040 A[Catch: Exception -> 0x002b, TryCatch #0 {Exception -> 0x002b, blocks: (B:25:0x0009, B:27:0x000f, B:29:0x0016, B:30:0x002f, B:4:0x0039, B:8:0x0040, B:11:0x0075, B:13:0x0088, B:15:0x0096), top: B:24:0x0009 }] */
|
||
/*
|
||
Code decompiled incorrectly, please refer to instructions dump.
|
||
To view partially-correct add '--show-bad-code' argument
|
||
*/
|
||
public final com.mbridge.msdk.foundation.same.report.d.c a(java.util.List<com.mbridge.msdk.foundation.entity.CampaignEx> r5, com.mbridge.msdk.foundation.same.report.d.c r6) {
|
||
/*
|
||
r4 = this;
|
||
com.mbridge.msdk.foundation.same.report.d.c r0 = new com.mbridge.msdk.foundation.same.report.d.c
|
||
r0.<init>()
|
||
java.lang.String r1 = ""
|
||
if (r5 == 0) goto L38
|
||
int r2 = r5.size() // Catch: java.lang.Exception -> L2b
|
||
if (r2 <= 0) goto L38
|
||
r2 = 0
|
||
java.lang.Object r3 = r5.get(r2) // Catch: java.lang.Exception -> L2b
|
||
if (r3 == 0) goto L2e
|
||
java.lang.Object r1 = r5.get(r2) // Catch: java.lang.Exception -> L2b
|
||
com.mbridge.msdk.foundation.entity.CampaignEx r1 = (com.mbridge.msdk.foundation.entity.CampaignEx) r1 // Catch: java.lang.Exception -> L2b
|
||
java.lang.String r1 = r1.getLocalRequestId() // Catch: java.lang.Exception -> L2b
|
||
java.lang.Object r2 = r5.get(r2) // Catch: java.lang.Exception -> L2b
|
||
com.mbridge.msdk.foundation.entity.CampaignEx r2 = (com.mbridge.msdk.foundation.entity.CampaignEx) r2 // Catch: java.lang.Exception -> L2b
|
||
java.lang.String r2 = r2.getNLRid() // Catch: java.lang.Exception -> L2b
|
||
goto L2f
|
||
L2b:
|
||
r5 = move-exception
|
||
goto La2
|
||
L2e:
|
||
r2 = r1
|
||
L2f:
|
||
r0.c(r1) // Catch: java.lang.Exception -> L2b
|
||
r0.b(r5) // Catch: java.lang.Exception -> L2b
|
||
r5 = r1
|
||
r1 = r2
|
||
goto L39
|
||
L38:
|
||
r5 = r1
|
||
L39:
|
||
boolean r1 = android.text.TextUtils.isEmpty(r1) // Catch: java.lang.Exception -> L2b
|
||
if (r1 == 0) goto L40
|
||
return r6
|
||
L40:
|
||
com.mbridge.msdk.foundation.same.report.d.e r6 = new com.mbridge.msdk.foundation.same.report.d.e // Catch: java.lang.Exception -> L2b
|
||
r6.<init>() // Catch: java.lang.Exception -> L2b
|
||
java.lang.String r1 = "cache"
|
||
r2 = 1
|
||
java.lang.Integer r3 = java.lang.Integer.valueOf(r2) // Catch: java.lang.Exception -> L2b
|
||
r6.a(r1, r3) // Catch: java.lang.Exception -> L2b
|
||
java.lang.String r1 = "hb"
|
||
java.lang.Integer r2 = java.lang.Integer.valueOf(r2) // Catch: java.lang.Exception -> L2b
|
||
r6.a(r1, r2) // Catch: java.lang.Exception -> L2b
|
||
java.lang.String r1 = "auto_load"
|
||
r2 = 2
|
||
java.lang.Integer r2 = java.lang.Integer.valueOf(r2) // Catch: java.lang.Exception -> L2b
|
||
r6.a(r1, r2) // Catch: java.lang.Exception -> L2b
|
||
java.lang.String r1 = "2000127"
|
||
r0.a(r1, r6) // Catch: java.lang.Exception -> L2b
|
||
java.lang.String r1 = "2000048"
|
||
r0.a(r1, r6) // Catch: java.lang.Exception -> L2b
|
||
boolean r6 = r4.D // Catch: java.lang.Exception -> L2b
|
||
if (r6 == 0) goto L73
|
||
r6 = 287(0x11f, float:4.02E-43)
|
||
goto L75
|
||
L73:
|
||
r6 = 94
|
||
L75:
|
||
r0.b(r6) // Catch: java.lang.Exception -> L2b
|
||
java.lang.String r6 = "1"
|
||
r0.i(r6) // Catch: java.lang.Exception -> L2b
|
||
java.lang.String r6 = "2"
|
||
r0.b(r6) // Catch: java.lang.Exception -> L2b
|
||
boolean r6 = android.text.TextUtils.isEmpty(r5) // Catch: java.lang.Exception -> L2b
|
||
if (r6 != 0) goto La9
|
||
com.mbridge.msdk.foundation.same.report.d.d r6 = com.mbridge.msdk.foundation.same.report.d.d.a() // Catch: java.lang.Exception -> L2b
|
||
java.util.LinkedHashMap r6 = r6.b() // Catch: java.lang.Exception -> L2b
|
||
boolean r6 = r6.containsKey(r5) // Catch: java.lang.Exception -> L2b
|
||
if (r6 != 0) goto La9
|
||
com.mbridge.msdk.foundation.same.report.d.d r6 = com.mbridge.msdk.foundation.same.report.d.d.a() // Catch: java.lang.Exception -> L2b
|
||
java.util.LinkedHashMap r6 = r6.b() // Catch: java.lang.Exception -> L2b
|
||
r6.put(r5, r0) // Catch: java.lang.Exception -> L2b
|
||
goto La9
|
||
La2:
|
||
boolean r6 = com.mbridge.msdk.MBridgeConstans.DEBUG
|
||
if (r6 == 0) goto La9
|
||
r5.printStackTrace()
|
||
La9:
|
||
return r0
|
||
*/
|
||
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.reward.b.a.a(java.util.List, com.mbridge.msdk.foundation.same.report.d.c):com.mbridge.msdk.foundation.same.report.d.c");
|
||
}
|
||
|
||
private void d(String str, String str2) {
|
||
try {
|
||
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
cVar.d(this.s);
|
||
cVar.b(this.D ? 287 : 94);
|
||
e eVar = new e();
|
||
eVar.a(TJAdUnitConstants.PARAM_PLACEMENT_NAME, str);
|
||
eVar.a("reason", str2);
|
||
cVar.a("m_temp_is_ready_check", eVar);
|
||
com.mbridge.msdk.reward.c.a.a.a().a("m_temp_is_ready_check", cVar);
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e2.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
|
||
public static /* synthetic */ void a(a aVar, String str, List list) {
|
||
if (list != null) {
|
||
try {
|
||
if (list.size() <= 0 || aVar.V) {
|
||
return;
|
||
}
|
||
com.mbridge.msdk.foundation.db.e.a(g.a(com.mbridge.msdk.foundation.controller.c.m().c())).a((List<CampaignEx>) list, str);
|
||
} catch (Throwable th) {
|
||
af.b("RewardVideoController", th.getMessage());
|
||
}
|
||
}
|
||
}
|
||
|
||
public static /* synthetic */ void a(a aVar, String str, com.mbridge.msdk.foundation.same.report.d.c cVar, InterVideoOutListener interVideoOutListener) {
|
||
if (aVar.H) {
|
||
if (cVar == null) {
|
||
cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
||
cVar.b(aVar.M);
|
||
}
|
||
try {
|
||
e eVar = new e();
|
||
if (interVideoOutListener != null) {
|
||
eVar.a("listener_state", 1);
|
||
} else {
|
||
eVar.a("listener_state", 2);
|
||
}
|
||
cVar.a(str, eVar);
|
||
com.mbridge.msdk.reward.c.a.a.a().a(str, cVar);
|
||
} catch (Exception e2) {
|
||
if (MBridgeConstans.DEBUG) {
|
||
e2.printStackTrace();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|