- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
721 lines
32 KiB
Java
721 lines
32 KiB
Java
package com.mbridge.msdk.newreward.a;
|
|
|
|
import android.os.SystemClock;
|
|
import android.text.TextUtils;
|
|
import androidx.annotation.Nullable;
|
|
import com.mbridge.msdk.MBridgeConstans;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
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.newout.RewardVideoListener;
|
|
import com.mbridge.msdk.newreward.function.common.MBridgeCommon;
|
|
import com.mbridge.msdk.newreward.function.common.MBridgeDailyPlayModel;
|
|
import com.mbridge.msdk.newreward.function.common.MBridgeGlobalCommon;
|
|
import com.mbridge.msdk.newreward.function.common.MBridgeSharedPreferenceModel;
|
|
import com.mbridge.msdk.out.MBridgeIds;
|
|
import java.util.ArrayList;
|
|
import java.util.Deque;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.concurrent.ConcurrentLinkedDeque;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class d implements c {
|
|
private Deque<e> a;
|
|
private RewardVideoListener c;
|
|
private com.mbridge.msdk.newreward.function.e.f d;
|
|
private com.mbridge.msdk.newreward.function.command.c e;
|
|
private MBridgeIds f;
|
|
private Map g;
|
|
private com.mbridge.msdk.newreward.b.b h;
|
|
private com.mbridge.msdk.newreward.function.g.c k;
|
|
private final Object b = new Object();
|
|
private int i = 1;
|
|
private int j = 1;
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.c
|
|
public final void a(Object obj) {
|
|
try {
|
|
this.c = (RewardVideoListener) obj;
|
|
} catch (Throwable unused) {
|
|
this.c = null;
|
|
}
|
|
}
|
|
|
|
public d() {
|
|
if (this.a == null) {
|
|
this.a = new ConcurrentLinkedDeque();
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.c
|
|
public final void a(Object... objArr) {
|
|
this.e = (com.mbridge.msdk.newreward.function.command.c) objArr[0];
|
|
this.h = (com.mbridge.msdk.newreward.b.b) objArr[1];
|
|
com.mbridge.msdk.newreward.function.command.d.a().a(this.e);
|
|
final Map a = this.e.a("mb_ad_type", Integer.valueOf(this.h.e()), "mb_ad_is_header_bidding", Boolean.valueOf(this.h.f()), "mb_ad_pid", this.h.d(), "mb_ad_unit_id", this.h.c());
|
|
this.g = a;
|
|
this.f = (MBridgeIds) this.e.a(a, com.mbridge.msdk.newreward.function.command.f.CREATE_BIDS);
|
|
com.mbridge.msdk.newreward.function.command.c cVar = this.e;
|
|
cVar.c(cVar.a("mb_ad_unit_id", this.h.c(), "command_type", com.mbridge.msdk.newreward.function.command.f.UNIT_INIT), new com.mbridge.msdk.newreward.a.b.b() { // from class: com.mbridge.msdk.newreward.a.d.1
|
|
@Override // com.mbridge.msdk.newreward.a.b.b
|
|
public final void reqFailed(com.mbridge.msdk.foundation.c.b bVar) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.b.b
|
|
public final void reqSuccessful(Object obj) {
|
|
}
|
|
});
|
|
com.mbridge.msdk.newreward.function.d.c.a().b().a(this.h.e(), this.h.d(), this.h.c());
|
|
this.e.a((Object) a, com.mbridge.msdk.newreward.function.command.f.REQ_SETTING, new com.mbridge.msdk.newreward.a.b.b() { // from class: com.mbridge.msdk.newreward.a.d.2
|
|
@Override // com.mbridge.msdk.newreward.a.b.b
|
|
public final void reqFailed(com.mbridge.msdk.foundation.c.b bVar) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.b.b
|
|
public final void reqSuccessful(Object obj) {
|
|
d.this.d = (com.mbridge.msdk.newreward.function.e.f) obj;
|
|
d.this.g = a;
|
|
if (d.this.h != null) {
|
|
d.this.h.a(d.this.d);
|
|
}
|
|
((MBridgeDailyPlayModel) d.this.e.a(a, com.mbridge.msdk.newreward.function.command.f.CREATE_DAILY)).setMaxPlayCount(d.this.d.b() == null ? 0 : d.this.d.b().d());
|
|
}
|
|
});
|
|
Map map = this.g;
|
|
map.put("command_type", com.mbridge.msdk.newreward.function.command.f.RESTORE_DB);
|
|
this.e.c(map, new com.mbridge.msdk.newreward.a.b.b() { // from class: com.mbridge.msdk.newreward.a.d.3
|
|
@Override // com.mbridge.msdk.newreward.a.b.b
|
|
public final void reqFailed(com.mbridge.msdk.foundation.c.b bVar) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.b.b
|
|
public final void reqSuccessful(Object obj) {
|
|
d.this.b(obj);
|
|
}
|
|
});
|
|
com.mbridge.msdk.newreward.function.command.c cVar2 = this.e;
|
|
cVar2.f(cVar2.a("controller_model", this.h, "command_manager", cVar2, "adapter_manager", this));
|
|
int a2 = ah.a().a(MBridgeCommon.SharedPreference.KEY_LOADING_CAPACITY, 1);
|
|
this.j = a2;
|
|
if (a2 <= 0) {
|
|
this.j = 1;
|
|
}
|
|
this.k = com.mbridge.msdk.newreward.function.g.a.a();
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.c
|
|
public final void a(e eVar, b bVar) {
|
|
e peek;
|
|
if (eVar == null || bVar == null) {
|
|
return;
|
|
}
|
|
eVar.a(this.d);
|
|
eVar.a(this.c);
|
|
eVar.a(this.f);
|
|
com.mbridge.msdk.newreward.function.g.c cVar = this.k;
|
|
if (cVar != null) {
|
|
eVar.a(cVar);
|
|
}
|
|
com.mbridge.msdk.newreward.function.command.c cVar2 = this.e;
|
|
if (cVar2 != null) {
|
|
cVar2.a(eVar, com.mbridge.msdk.newreward.function.command.f.REPORT_LOAD_START, (Object) null);
|
|
}
|
|
int integer = MBridgeSharedPreferenceModel.getInstance().getInteger(String.format(MBridgeCommon.SharedPreference.KEY_VCN, this.h.c()), 1);
|
|
this.i = integer;
|
|
if (integer <= 0) {
|
|
this.i = 1;
|
|
}
|
|
if (a(1) < this.j) {
|
|
try {
|
|
synchronized (this.b) {
|
|
try {
|
|
if (d(eVar)) {
|
|
return;
|
|
}
|
|
if (a(false) && !eVar.d()) {
|
|
if (!TextUtils.isEmpty(eVar.J()) && com.mbridge.msdk.newreward.function.h.c.c(eVar.J())) {
|
|
com.mbridge.msdk.newreward.function.command.c cVar3 = this.e;
|
|
if (((Boolean) cVar3.b(cVar3.a("adapter_model", eVar, "command_manager", cVar3, "candidate_type", 1, "reason", new com.mbridge.msdk.foundation.c.b(880038)))).booleanValue()) {
|
|
eVar.c(true);
|
|
com.mbridge.msdk.newreward.function.command.c cVar4 = this.e;
|
|
com.mbridge.msdk.newreward.function.a.b bVar2 = (com.mbridge.msdk.newreward.function.a.b) cVar4.b(cVar4.a("adapter_model", eVar, "command_manager", cVar4, "candidate_type", 2, "reason", new com.mbridge.msdk.foundation.c.b(880038)));
|
|
if (bVar2 != null && bVar2.h() == com.mbridge.msdk.newreward.function.a.b.d) {
|
|
eVar.D().a(bVar2.a());
|
|
a(eVar, com.mbridge.msdk.newreward.function.command.f.REPORT_LOAD_V3_CAMPAIGN_SUCCESS);
|
|
this.c.onLoadSuccess(this.f);
|
|
eVar.f(true);
|
|
a(eVar, com.mbridge.msdk.newreward.function.command.f.REPORT_LOAD_VIDEO_CAMPAIGN_SUCCESS);
|
|
this.c.onVideoLoadSuccess(this.f);
|
|
eVar.h(true);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
int integer2 = MBridgeSharedPreferenceModel.getInstance().getInteger(String.format(MBridgeCommon.SharedPreference.KEY_VCN, eVar.H()), 1);
|
|
if (this.a.size() != 0 && this.a.size() >= integer2) {
|
|
if (TextUtils.isEmpty(eVar.J()) && (peek = this.a.peek()) != null && peek.D() != null && peek.D().b() != null) {
|
|
eVar.D().a(peek.D().b());
|
|
} else {
|
|
for (e eVar2 : this.a) {
|
|
com.mbridge.msdk.newreward.function.c.a.b b = eVar2.D().b();
|
|
if (b != null && b.G() == 1) {
|
|
eVar2.c(eVar.G());
|
|
eVar.d(true);
|
|
}
|
|
}
|
|
}
|
|
a(eVar, com.mbridge.msdk.newreward.function.command.f.REPORT_LOAD_V3_CAMPAIGN_SUCCESS);
|
|
this.c.onLoadSuccess(this.f);
|
|
eVar.f(true);
|
|
a(eVar, com.mbridge.msdk.newreward.function.command.f.REPORT_LOAD_VIDEO_CAMPAIGN_SUCCESS);
|
|
this.c.onVideoLoadSuccess(this.f);
|
|
eVar.h(true);
|
|
break;
|
|
}
|
|
}
|
|
for (e eVar3 : this.a) {
|
|
if (!eVar3.D().c() && eVar3.y() == 2) {
|
|
this.a.remove(eVar3);
|
|
String str = "";
|
|
if (eVar3.D() != null && eVar3.D().b() != null) {
|
|
str = eVar3.D().b().a() + "";
|
|
}
|
|
com.mbridge.msdk.foundation.same.report.d.d.a().b(eVar3.G(), str);
|
|
}
|
|
}
|
|
b(eVar);
|
|
while (a(2) > this.i) {
|
|
this.a.pollFirst();
|
|
}
|
|
this.a.add(eVar);
|
|
eVar.a = bVar;
|
|
eVar.b(SystemClock.elapsedRealtime());
|
|
bVar.a(eVar);
|
|
return;
|
|
} finally {
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
RewardVideoListener rewardVideoListener = this.c;
|
|
if (rewardVideoListener != null) {
|
|
rewardVideoListener.onVideoLoadFail(new MBridgeIds(), e.getMessage());
|
|
}
|
|
a(eVar, com.mbridge.msdk.foundation.c.a.b(880020, "errorCode: 3501 errorMessage: " + e.getMessage()));
|
|
com.mbridge.msdk.newreward.function.d.c.a().b().a(eVar.h(), eVar.C(), eVar.H(), eVar.G(), 406);
|
|
return;
|
|
}
|
|
}
|
|
RewardVideoListener rewardVideoListener2 = this.c;
|
|
if (rewardVideoListener2 != null) {
|
|
rewardVideoListener2.onVideoLoadFail(new MBridgeIds(), "current unit is loading");
|
|
}
|
|
a(eVar, com.mbridge.msdk.foundation.c.a.b(880016, "errorCode: 3501 errorMessage: current unit is loading"));
|
|
}
|
|
|
|
private void b(e eVar) {
|
|
try {
|
|
List<String> e = com.mbridge.msdk.newreward.function.d.c.a().b().e(eVar.h(), eVar.C(), eVar.H());
|
|
if (e == null || e.size() <= 0) {
|
|
return;
|
|
}
|
|
String str = "";
|
|
if (eVar.D() != null && eVar.D().b() != null) {
|
|
str = eVar.D().b().a() + "";
|
|
}
|
|
Iterator<String> it = e.iterator();
|
|
while (it.hasNext()) {
|
|
com.mbridge.msdk.foundation.same.report.d.d.a().b(it.next(), str);
|
|
}
|
|
} catch (Exception e2) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
e2.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
|
|
private void a(e eVar, com.mbridge.msdk.newreward.function.command.f fVar) {
|
|
int i;
|
|
int i2;
|
|
if (eVar == null) {
|
|
return;
|
|
}
|
|
List<CampaignEx> a = eVar.D() != null ? eVar.D().a() : null;
|
|
try {
|
|
if (eVar.D() == null || eVar.D().b() == null) {
|
|
i = 0;
|
|
i2 = 0;
|
|
} else {
|
|
com.mbridge.msdk.newreward.function.c.a.b b = eVar.D().b();
|
|
i2 = b.a();
|
|
i = b.b();
|
|
}
|
|
int filterCallBackState = (a == null || a.isEmpty()) ? 0 : a.get(0).getFilterCallBackState();
|
|
com.mbridge.msdk.newreward.function.command.c cVar = this.e;
|
|
Object[] objArr = new Object[12];
|
|
objArr[0] = "metrics_data";
|
|
objArr[1] = a;
|
|
int i3 = 2;
|
|
objArr[2] = "auto_load";
|
|
if (!eVar.I()) {
|
|
i3 = 1;
|
|
}
|
|
objArr[3] = Integer.valueOf(i3);
|
|
objArr[4] = "cache";
|
|
objArr[5] = 1;
|
|
objArr[6] = com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_REQUEST_INDEX;
|
|
objArr[7] = Integer.valueOf(i2);
|
|
objArr[8] = com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_SHOW_INDEX;
|
|
objArr[9] = Integer.valueOf(i);
|
|
objArr[10] = CampaignEx.KEY_SECOND_REQUEST_CALLBACK_STATE;
|
|
objArr[11] = Integer.valueOf(filterCallBackState);
|
|
cVar.a(eVar, fVar, cVar.a(objArr));
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void b(Object obj) {
|
|
for (com.mbridge.msdk.newreward.function.c.a.b bVar : (List) obj) {
|
|
e eVar = new e(false, ((Integer) this.g.get("mb_ad_type")).intValue(), bVar.h(), bVar.e(), bVar.i());
|
|
com.mbridge.msdk.newreward.function.e.a aVar = new com.mbridge.msdk.newreward.function.e.a();
|
|
aVar.a(bVar);
|
|
eVar.a(aVar);
|
|
eVar.a(this.d);
|
|
eVar.f(bVar.g());
|
|
eVar.c(2);
|
|
eVar.a(this.f);
|
|
eVar.a = new g(this.e);
|
|
eVar.a(this.c);
|
|
this.a.add(eVar);
|
|
}
|
|
}
|
|
|
|
private void a(e eVar, com.mbridge.msdk.foundation.c.b bVar) {
|
|
int i;
|
|
int i2;
|
|
eVar.c(2);
|
|
eVar.h(true);
|
|
int i3 = 0;
|
|
if (eVar.D() == null || eVar.D().b() == null) {
|
|
i = 0;
|
|
i2 = 0;
|
|
} else {
|
|
com.mbridge.msdk.newreward.function.c.a.b b = eVar.D().b();
|
|
int a = b.a();
|
|
i2 = b.b();
|
|
if (b.E() != null && !b.E().isEmpty()) {
|
|
i3 = b.E().get(0).getFilterCallBackState();
|
|
}
|
|
i = i3;
|
|
i3 = a;
|
|
}
|
|
com.mbridge.msdk.newreward.function.command.c cVar = this.e;
|
|
cVar.a(eVar, com.mbridge.msdk.newreward.function.command.f.REPORT_LOAD_FAILED, cVar.a("metrics_data", bVar, com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_REQUEST_INDEX, Integer.valueOf(i3), com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_SHOW_INDEX, Integer.valueOf(i2), CampaignEx.KEY_SECOND_REQUEST_CALLBACK_STATE, Integer.valueOf(i)));
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.c
|
|
public final void a(f fVar) {
|
|
e peek;
|
|
synchronized (this.b) {
|
|
try {
|
|
} catch (Throwable th) {
|
|
c();
|
|
a("show exception: " + th.getMessage());
|
|
}
|
|
if (this.a.isEmpty()) {
|
|
this.h.a(com.mbridge.msdk.newreward.function.h.d.a(""));
|
|
RewardVideoListener rewardVideoListener = this.c;
|
|
if (rewardVideoListener != null) {
|
|
rewardVideoListener.onShowFail(this.f, com.mbridge.msdk.foundation.c.a.a(890005));
|
|
}
|
|
c();
|
|
a(com.mbridge.msdk.foundation.c.a.a(890005));
|
|
return;
|
|
}
|
|
while (a(2) > this.i) {
|
|
this.a.pollFirst();
|
|
}
|
|
ConcurrentLinkedDeque concurrentLinkedDeque = new ConcurrentLinkedDeque();
|
|
while (true) {
|
|
if (this.a.isEmpty()) {
|
|
break;
|
|
}
|
|
try {
|
|
peek = this.a.peek();
|
|
} catch (Exception e) {
|
|
if (this.a.size() == 1) {
|
|
this.h.a(com.mbridge.msdk.newreward.function.h.d.a(""));
|
|
RewardVideoListener rewardVideoListener2 = this.c;
|
|
if (rewardVideoListener2 != null) {
|
|
rewardVideoListener2.onShowFail(this.f, e.getMessage());
|
|
}
|
|
a("show failed, exception is " + e.getMessage());
|
|
}
|
|
}
|
|
if (peek == null || peek.D() == null || !peek.D().c()) {
|
|
if (peek != null && peek.y() == 2 && !peek.D().c()) {
|
|
if (this.a.size() == 1) {
|
|
this.h.a(peek);
|
|
RewardVideoListener rewardVideoListener3 = this.c;
|
|
if (rewardVideoListener3 != null) {
|
|
rewardVideoListener3.onShowFail(this.f, com.mbridge.msdk.foundation.c.a.a(890006));
|
|
}
|
|
a(peek, com.mbridge.msdk.foundation.c.a.a(890006));
|
|
}
|
|
this.a.poll();
|
|
} else {
|
|
if (this.a.size() == 1) {
|
|
RewardVideoListener rewardVideoListener4 = this.c;
|
|
if (rewardVideoListener4 != null) {
|
|
rewardVideoListener4.onShowFail(this.f, com.mbridge.msdk.foundation.c.a.a(890007));
|
|
}
|
|
a(peek, com.mbridge.msdk.foundation.c.a.a(890007));
|
|
}
|
|
concurrentLinkedDeque.push(this.a.poll());
|
|
}
|
|
} else if (peek.h() != 287 || !ah.a().a("s_a_w_n_c", true) || ak.l(com.mbridge.msdk.foundation.controller.c.m().c())) {
|
|
c(peek);
|
|
b bVar = peek.a;
|
|
peek.a(fVar);
|
|
this.h.a(peek);
|
|
com.mbridge.msdk.newreward.function.command.d.a().a(peek);
|
|
bVar.b(peek);
|
|
this.a.poll();
|
|
} else {
|
|
RewardVideoListener rewardVideoListener5 = this.c;
|
|
if (rewardVideoListener5 != null) {
|
|
rewardVideoListener5.onShowFail(this.f, com.mbridge.msdk.foundation.c.a.a(890011));
|
|
}
|
|
a(peek, com.mbridge.msdk.foundation.c.a.a(890011));
|
|
this.a.poll();
|
|
}
|
|
}
|
|
while (!concurrentLinkedDeque.isEmpty()) {
|
|
this.a.push((e) concurrentLinkedDeque.poll());
|
|
}
|
|
c();
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.c
|
|
public final boolean a(boolean z) {
|
|
com.mbridge.msdk.newreward.function.c.a.b b;
|
|
Object obj = null;
|
|
com.mbridge.msdk.newreward.function.c.a.b bVar = null;
|
|
for (e eVar : this.a) {
|
|
if (eVar != null) {
|
|
com.mbridge.msdk.newreward.function.e.a D = eVar.D();
|
|
if (D == null || (b = D.b()) == null) {
|
|
obj = eVar;
|
|
} else {
|
|
if (D.c()) {
|
|
if (z) {
|
|
a(true, eVar, b);
|
|
}
|
|
return true;
|
|
}
|
|
obj = eVar;
|
|
bVar = b;
|
|
}
|
|
}
|
|
}
|
|
if (z) {
|
|
if (obj == null) {
|
|
obj = this.h;
|
|
}
|
|
a(false, obj, bVar);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private void a(boolean z, Object obj, com.mbridge.msdk.newreward.function.c.a.b bVar) {
|
|
if (this.e == null || obj == null) {
|
|
return;
|
|
}
|
|
try {
|
|
String valueOf = z ? String.valueOf(1) : String.valueOf(2);
|
|
String isReadyNotReadyReasonType = MBridgeGlobalCommon.getIsReadyNotReadyReasonType(bVar);
|
|
if (z) {
|
|
com.mbridge.msdk.newreward.function.command.c cVar = this.e;
|
|
cVar.a(obj, com.mbridge.msdk.newreward.function.command.f.REPORT_IS_READY_CHECK, cVar.a("result", valueOf));
|
|
} else {
|
|
com.mbridge.msdk.newreward.function.command.c cVar2 = this.e;
|
|
cVar2.a(obj, com.mbridge.msdk.newreward.function.command.f.REPORT_IS_READY_CHECK, cVar2.a("result", valueOf, "type", isReadyNotReadyReasonType));
|
|
}
|
|
} catch (Throwable th) {
|
|
af.a("reportReadyCheck", th.getMessage());
|
|
}
|
|
}
|
|
|
|
private void c(e eVar) {
|
|
e eVar2;
|
|
if (eVar == null || TextUtils.isEmpty(eVar.k())) {
|
|
return;
|
|
}
|
|
try {
|
|
Deque<e> deque = this.a;
|
|
if (deque != null) {
|
|
Iterator<e> it = deque.iterator();
|
|
while (it.hasNext()) {
|
|
eVar2 = it.next();
|
|
if (eVar2 != null && eVar2.j() && (eVar2.D() == null || !eVar2.D().c())) {
|
|
if (eVar.k().equals(eVar2.G())) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
eVar2 = null;
|
|
if (eVar2 != null) {
|
|
com.mbridge.msdk.newreward.function.command.c cVar = this.e;
|
|
cVar.c(cVar.a("adapter_model", eVar, "queue_first_adapter_model", eVar2), com.mbridge.msdk.newreward.function.command.f.UPDATE_CAM_TOKEN_RULE);
|
|
}
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
|
|
private int a(int i) {
|
|
int i2 = 0;
|
|
if (this.a.size() == 0) {
|
|
return 0;
|
|
}
|
|
for (e eVar : this.a) {
|
|
if (i == 1) {
|
|
if (eVar.y() == 1) {
|
|
i2++;
|
|
}
|
|
} else if (i == 2 && eVar.D().c()) {
|
|
i2++;
|
|
}
|
|
}
|
|
return i2;
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:20:0x005d A[Catch: Exception -> 0x006c, TRY_ENTER, TryCatch #0 {Exception -> 0x006c, blocks: (B:17:0x0057, B:20:0x005d, B:21:0x006f, B:23:0x007b, B:27:0x008f), top: B:16:0x0057 }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:23:0x007b A[Catch: Exception -> 0x006c, TryCatch #0 {Exception -> 0x006c, blocks: (B:17:0x0057, B:20:0x005d, B:21:0x006f, B:23:0x007b, B:27:0x008f), top: B:16:0x0057 }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:26:0x0088 */
|
|
/* JADX WARN: Removed duplicated region for block: B:30:0x008c */
|
|
/* JADX WARN: Removed duplicated region for block: B:39:0x009f A[Catch: Exception -> 0x0026, TRY_ENTER, TRY_LEAVE, TryCatch #1 {Exception -> 0x0026, blocks: (B:3:0x0003, B:5:0x0007, B:7:0x000f, B:9:0x0019, B:11:0x0021, B:12:0x002b, B:14:0x0051, B:39:0x009f, B:42:0x00a7, B:44:0x00b1, B:45:0x00cc), top: B:2:0x0003 }] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private boolean d(com.mbridge.msdk.newreward.a.e r10) {
|
|
/*
|
|
r9 = this;
|
|
java.lang.String r0 = "error_code"
|
|
r1 = 0
|
|
java.util.Deque<com.mbridge.msdk.newreward.a.e> r2 = r9.a // Catch: java.lang.Exception -> L26
|
|
if (r2 == 0) goto L29
|
|
java.lang.Object r2 = r2.peek() // Catch: java.lang.Exception -> L26
|
|
com.mbridge.msdk.newreward.a.e r2 = (com.mbridge.msdk.newreward.a.e) r2 // Catch: java.lang.Exception -> L26
|
|
if (r2 == 0) goto L29
|
|
java.lang.String r3 = r2.i() // Catch: java.lang.Exception -> L26
|
|
boolean r4 = android.text.TextUtils.isEmpty(r3) // Catch: java.lang.Exception -> L26
|
|
if (r4 != 0) goto L29
|
|
java.lang.String r4 = "-1"
|
|
boolean r3 = r3.equals(r4) // Catch: java.lang.Exception -> L26
|
|
if (r3 == 0) goto L29
|
|
long r2 = r2.g() // Catch: java.lang.Exception -> L26
|
|
goto L2b
|
|
L26:
|
|
r10 = move-exception
|
|
goto Ld8
|
|
L29:
|
|
r2 = 0
|
|
L2b:
|
|
com.mbridge.msdk.newreward.function.command.c r4 = r9.e // Catch: java.lang.Exception -> L26
|
|
r5 = 4
|
|
java.lang.Object[] r5 = new java.lang.Object[r5] // Catch: java.lang.Exception -> L26
|
|
java.lang.String r6 = "adapter_model"
|
|
r5[r1] = r6 // Catch: java.lang.Exception -> L26
|
|
r6 = 1
|
|
r5[r6] = r10 // Catch: java.lang.Exception -> L26
|
|
java.lang.String r7 = "last_response_empty_time"
|
|
r8 = 2
|
|
r5[r8] = r7 // Catch: java.lang.Exception -> L26
|
|
java.lang.Long r2 = java.lang.Long.valueOf(r2) // Catch: java.lang.Exception -> L26
|
|
r3 = 3
|
|
r5[r3] = r2 // Catch: java.lang.Exception -> L26
|
|
java.util.Map r2 = r4.a(r5) // Catch: java.lang.Exception -> L26
|
|
com.mbridge.msdk.newreward.function.command.f r3 = com.mbridge.msdk.newreward.function.command.f.CHECK_IS_REQUEST_CONTROL // Catch: java.lang.Exception -> L26
|
|
java.lang.Object r2 = r4.b(r2, r3) // Catch: java.lang.Exception -> L26
|
|
java.util.Map r2 = (java.util.Map) r2 // Catch: java.lang.Exception -> L26
|
|
if (r2 == 0) goto L9d
|
|
int r3 = r2.size() // Catch: java.lang.Exception -> L26
|
|
if (r3 <= 0) goto L9d
|
|
com.mbridge.msdk.newout.RewardVideoListener r3 = r9.c // Catch: java.lang.Exception -> L6c
|
|
java.lang.String r4 = "msg"
|
|
if (r3 == 0) goto L6f
|
|
com.mbridge.msdk.out.MBridgeIds r5 = new com.mbridge.msdk.out.MBridgeIds // Catch: java.lang.Exception -> L6c
|
|
r5.<init>() // Catch: java.lang.Exception -> L6c
|
|
java.lang.Object r7 = r2.get(r4) // Catch: java.lang.Exception -> L6c
|
|
java.lang.String r7 = (java.lang.String) r7 // Catch: java.lang.Exception -> L6c
|
|
r3.onVideoLoadFail(r5, r7) // Catch: java.lang.Exception -> L6c
|
|
goto L6f
|
|
L6c:
|
|
r10 = move-exception
|
|
r1 = r6
|
|
goto Ld8
|
|
L6f:
|
|
java.lang.Object r3 = r2.get(r0) // Catch: java.lang.Exception -> L6c
|
|
java.lang.CharSequence r3 = (java.lang.CharSequence) r3 // Catch: java.lang.Exception -> L6c
|
|
boolean r3 = android.text.TextUtils.isEmpty(r3) // Catch: java.lang.Exception -> L6c
|
|
if (r3 != 0) goto L85
|
|
java.lang.Object r0 = r2.get(r0) // Catch: java.lang.Exception -> L6c
|
|
java.lang.String r0 = (java.lang.String) r0 // Catch: java.lang.Exception -> L6c
|
|
int r1 = java.lang.Integer.parseInt(r0) // Catch: java.lang.Exception -> L6c
|
|
L85:
|
|
r0 = -1
|
|
if (r1 != r0) goto L8c
|
|
r0 = 880018(0xd6d92, float:1.233168E-39)
|
|
goto L8f
|
|
L8c:
|
|
r0 = 880002(0xd6d82, float:1.233145E-39)
|
|
L8f:
|
|
java.lang.Object r2 = r2.get(r4) // Catch: java.lang.Exception -> L6c
|
|
java.lang.String r2 = (java.lang.String) r2 // Catch: java.lang.Exception -> L6c
|
|
com.mbridge.msdk.foundation.c.b r0 = com.mbridge.msdk.foundation.c.a.a(r1, r0, r2) // Catch: java.lang.Exception -> L6c
|
|
r9.a(r10, r0) // Catch: java.lang.Exception -> L6c
|
|
r1 = r6
|
|
L9d:
|
|
if (r1 == 0) goto Ldf
|
|
com.mbridge.msdk.newreward.function.e.a r0 = r10.D() // Catch: java.lang.Exception -> L26
|
|
java.lang.String r2 = ""
|
|
if (r0 == 0) goto Lcc
|
|
com.mbridge.msdk.newreward.function.e.a r0 = r10.D() // Catch: java.lang.Exception -> L26
|
|
com.mbridge.msdk.newreward.function.c.a.b r0 = r0.b() // Catch: java.lang.Exception -> L26
|
|
if (r0 == 0) goto Lcc
|
|
java.lang.StringBuilder r0 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L26
|
|
r0.<init>() // Catch: java.lang.Exception -> L26
|
|
com.mbridge.msdk.newreward.function.e.a r3 = r10.D() // Catch: java.lang.Exception -> L26
|
|
com.mbridge.msdk.newreward.function.c.a.b r3 = r3.b() // Catch: java.lang.Exception -> L26
|
|
int r3 = r3.a() // Catch: java.lang.Exception -> L26
|
|
r0.append(r3) // Catch: java.lang.Exception -> L26
|
|
r0.append(r2) // Catch: java.lang.Exception -> L26
|
|
java.lang.String r2 = r0.toString() // Catch: java.lang.Exception -> L26
|
|
Lcc:
|
|
com.mbridge.msdk.foundation.same.report.d.d r0 = com.mbridge.msdk.foundation.same.report.d.d.a() // Catch: java.lang.Exception -> L26
|
|
java.lang.String r10 = r10.G() // Catch: java.lang.Exception -> L26
|
|
r0.b(r10, r2) // Catch: java.lang.Exception -> L26
|
|
goto Ldf
|
|
Ld8:
|
|
boolean r0 = com.mbridge.msdk.MBridgeConstans.DEBUG
|
|
if (r0 == 0) goto Ldf
|
|
r10.printStackTrace()
|
|
Ldf:
|
|
return r1
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.newreward.a.d.d(com.mbridge.msdk.newreward.a.e):boolean");
|
|
}
|
|
|
|
private void a(String str) {
|
|
try {
|
|
com.mbridge.msdk.newreward.b.b bVar = this.h;
|
|
if (bVar == null) {
|
|
return;
|
|
}
|
|
com.mbridge.msdk.newreward.function.command.c cVar = this.e;
|
|
cVar.a(bVar, com.mbridge.msdk.newreward.function.command.f.REPORT_SHOW_FAIL, cVar.a("reason", str));
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
|
|
private void a(e eVar, String str) {
|
|
int i;
|
|
int i2;
|
|
if (eVar == null) {
|
|
return;
|
|
}
|
|
try {
|
|
int i3 = 0;
|
|
CampaignEx campaignEx = (eVar.D() == null || eVar.D().a() == null || eVar.D().a().isEmpty()) ? null : eVar.D().a().get(0);
|
|
if (campaignEx != null) {
|
|
com.mbridge.msdk.foundation.same.report.d.e eVar2 = new com.mbridge.msdk.foundation.same.report.d.e();
|
|
if (eVar.D() == null || eVar.D().b() == null) {
|
|
i = 0;
|
|
i2 = 0;
|
|
} else {
|
|
com.mbridge.msdk.newreward.function.c.a.b b = eVar.D().b();
|
|
i = b.a();
|
|
i2 = b.b();
|
|
if (b.E() != null && !b.E().isEmpty()) {
|
|
i3 = b.E().get(0).getFilterCallBackState();
|
|
}
|
|
}
|
|
eVar2.a(CampaignEx.KEY_SECOND_REQUEST_CALLBACK_STATE, Integer.valueOf(i3));
|
|
eVar2.a(com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_REQUEST_INDEX, Integer.valueOf(i));
|
|
eVar2.a(com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_SHOW_INDEX, Integer.valueOf(i2));
|
|
eVar2.a("reason", str);
|
|
com.mbridge.msdk.foundation.same.report.d.d.a().a("2000131", campaignEx, eVar2);
|
|
return;
|
|
}
|
|
a(str);
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
|
|
private void c() {
|
|
try {
|
|
com.mbridge.msdk.newreward.b.b bVar = this.h;
|
|
if (bVar != null) {
|
|
if (bVar.a() != null) {
|
|
this.e.a(this.h.a(), com.mbridge.msdk.newreward.function.command.f.REPORT_SHOW_START, (Object) null);
|
|
} else {
|
|
this.e.a(this.h, com.mbridge.msdk.newreward.function.command.f.REPORT_SHOW_START, (Object) null);
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.c
|
|
@Nullable
|
|
public final e b() {
|
|
e peek;
|
|
Deque<e> deque = this.a;
|
|
if (deque == null || deque.size() == 0 || (peek = this.a.peek()) == null) {
|
|
return null;
|
|
}
|
|
return peek;
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.newreward.a.c
|
|
public final List<e> a() {
|
|
ArrayList arrayList = new ArrayList();
|
|
Deque<e> deque = this.a;
|
|
if (deque != null && deque.size() != 0) {
|
|
Iterator<e> it = this.a.iterator();
|
|
while (it.hasNext()) {
|
|
arrayList.add(it.next());
|
|
}
|
|
}
|
|
return arrayList;
|
|
}
|
|
|
|
public final void a(e eVar) {
|
|
Deque<e> deque;
|
|
if (eVar == null || (deque = this.a) == null) {
|
|
return;
|
|
}
|
|
deque.addLast(eVar);
|
|
}
|
|
}
|