- 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
247 lines
8.2 KiB
Java
247 lines
8.2 KiB
Java
package com.mbridge.msdk.d;
|
|
|
|
import android.content.Context;
|
|
import android.os.Handler;
|
|
import android.os.Message;
|
|
import android.text.TextUtils;
|
|
import com.mbridge.msdk.foundation.controller.c;
|
|
import com.mbridge.msdk.foundation.db.e;
|
|
import com.mbridge.msdk.foundation.db.g;
|
|
import com.mbridge.msdk.foundation.db.m;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.entity.i;
|
|
import com.mbridge.msdk.foundation.tools.SameMD5;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.foundation.tools.ak;
|
|
import java.util.LinkedList;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class a {
|
|
private long a;
|
|
private boolean b;
|
|
private LinkedList<i> c;
|
|
private LinkedList<i> d;
|
|
private int e;
|
|
private int f;
|
|
private e g;
|
|
private com.mbridge.msdk.videocommon.d.a h;
|
|
private m i;
|
|
private g j;
|
|
private Handler k;
|
|
|
|
/* renamed from: com.mbridge.msdk.d.a$a, reason: collision with other inner class name */
|
|
public static class C0191a {
|
|
static a a = new a();
|
|
}
|
|
|
|
private a() {
|
|
this.b = false;
|
|
this.c = new LinkedList<>();
|
|
this.d = new LinkedList<>();
|
|
this.e = 0;
|
|
this.f = 0;
|
|
this.k = new Handler() { // from class: com.mbridge.msdk.d.a.1
|
|
@Override // android.os.Handler
|
|
public final void handleMessage(Message message) {
|
|
synchronized (a.this) {
|
|
try {
|
|
int i = message.what;
|
|
if (i != 1) {
|
|
if (i == 2) {
|
|
a.c(a.this);
|
|
}
|
|
} else {
|
|
if (a.this.b) {
|
|
return;
|
|
}
|
|
a aVar = a.this;
|
|
a.a(aVar, aVar.a);
|
|
sendMessageDelayed(obtainMessage(1), a.this.a);
|
|
}
|
|
} finally {
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
private boolean a(i iVar) {
|
|
boolean z = false;
|
|
if (iVar == null || TextUtils.isEmpty(iVar.b())) {
|
|
return false;
|
|
}
|
|
String b = iVar.b();
|
|
try {
|
|
if (this.g != null) {
|
|
com.mbridge.msdk.videocommon.d.a aVar = this.h;
|
|
int a = this.g.a(b, aVar != null ? aVar.f() : 0L);
|
|
if (a != -1) {
|
|
if (a != 1) {
|
|
}
|
|
} else if (!TextUtils.isEmpty(b)) {
|
|
LinkedList<i> linkedList = this.c;
|
|
if (linkedList != null && linkedList.contains(b)) {
|
|
this.c.remove(b);
|
|
} else {
|
|
LinkedList<i> linkedList2 = this.d;
|
|
if (linkedList2 != null && linkedList2.contains(b)) {
|
|
this.d.remove(b);
|
|
}
|
|
}
|
|
m mVar = this.i;
|
|
if (mVar != null) {
|
|
mVar.a(b);
|
|
}
|
|
}
|
|
try {
|
|
Handler handler = this.k;
|
|
handler.sendMessage(handler.obtainMessage(2));
|
|
return false;
|
|
} catch (Throwable th) {
|
|
th = th;
|
|
af.b("LoopTimer", th.getMessage(), th);
|
|
return z;
|
|
}
|
|
}
|
|
return true;
|
|
} catch (Throwable th2) {
|
|
th = th2;
|
|
z = true;
|
|
}
|
|
}
|
|
|
|
private void a(String str, String str2, boolean z) {
|
|
try {
|
|
Context c = c.m().c();
|
|
if (c == null) {
|
|
return;
|
|
}
|
|
final com.mbridge.msdk.reward.adapter.c cVar = new com.mbridge.msdk.reward.adapter.c(c, str, str2);
|
|
cVar.b(z);
|
|
cVar.a(new com.mbridge.msdk.reward.adapter.a() { // from class: com.mbridge.msdk.d.a.2
|
|
@Override // com.mbridge.msdk.reward.adapter.a
|
|
public final void a(List<CampaignEx> list, com.mbridge.msdk.foundation.same.report.d.c cVar2) {
|
|
}
|
|
|
|
@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 cVar2) {
|
|
a.this.k.sendMessage(a.this.k.obtainMessage(2));
|
|
cVar.a((com.mbridge.msdk.reward.adapter.a) null);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.reward.adapter.a
|
|
public final void a(String str3, com.mbridge.msdk.foundation.same.report.d.c cVar2) {
|
|
a.this.k.sendMessage(a.this.k.obtainMessage(2));
|
|
cVar.a((com.mbridge.msdk.reward.adapter.a) null);
|
|
}
|
|
});
|
|
com.mbridge.msdk.foundation.same.report.d.c cVar2 = new com.mbridge.msdk.foundation.same.report.d.c();
|
|
cVar2.c(SameMD5.getMD5(ak.d()));
|
|
cVar2.d(str2);
|
|
if (z) {
|
|
cVar2.b(287);
|
|
} else {
|
|
cVar2.b(94);
|
|
}
|
|
cVar2.i("0");
|
|
cVar2.b("1");
|
|
cVar.a(1, 8000, false, cVar2);
|
|
} catch (Exception e) {
|
|
af.b("LoopTimer", e.getMessage(), e);
|
|
}
|
|
}
|
|
|
|
public final void a(String str, String str2) {
|
|
if (this.c.contains(str2)) {
|
|
return;
|
|
}
|
|
this.c.add(new i(str, str2, 94));
|
|
m mVar = this.i;
|
|
if (mVar != null) {
|
|
mVar.a(str, str2, 94);
|
|
}
|
|
}
|
|
|
|
public final void b(String str, String str2) {
|
|
if (this.d.contains(str2)) {
|
|
return;
|
|
}
|
|
this.d.add(new i(str, str2, 287));
|
|
m mVar = this.i;
|
|
if (mVar != null) {
|
|
mVar.a(str, str2, 287);
|
|
}
|
|
}
|
|
|
|
public final void a(long j) {
|
|
if (this.j == null) {
|
|
this.j = g.a(c.m().c());
|
|
}
|
|
if (this.i == null) {
|
|
this.i = m.a(this.j);
|
|
}
|
|
List<i> a = this.i.a(287);
|
|
if (a != null) {
|
|
this.d.addAll(a);
|
|
for (i iVar : a) {
|
|
b(iVar.a(), iVar.b());
|
|
}
|
|
}
|
|
List<i> a2 = this.i.a(94);
|
|
if (a2 != null) {
|
|
this.c.addAll(a2);
|
|
for (i iVar2 : a2) {
|
|
a(iVar2.a(), iVar2.b());
|
|
}
|
|
}
|
|
if (this.g == null) {
|
|
this.g = e.a(this.j);
|
|
}
|
|
if (this.h == null) {
|
|
this.h = com.mbridge.msdk.videocommon.d.b.a().b();
|
|
}
|
|
this.a = j;
|
|
this.b = false;
|
|
Handler handler = this.k;
|
|
handler.sendMessageDelayed(handler.obtainMessage(1), this.a);
|
|
}
|
|
|
|
public static /* synthetic */ void a(a aVar, long j) {
|
|
LinkedList<i> linkedList = aVar.c;
|
|
if (linkedList == null || linkedList.size() <= 0 || aVar.e == 0 || aVar.c.size() <= aVar.e) {
|
|
LinkedList<i> linkedList2 = aVar.d;
|
|
if (linkedList2 == null || linkedList2.size() <= 0 || aVar.f == 0 || aVar.d.size() == aVar.f) {
|
|
aVar.f = 0;
|
|
aVar.e = 0;
|
|
Handler handler = aVar.k;
|
|
handler.sendMessage(handler.obtainMessage(2));
|
|
}
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void c(a aVar) {
|
|
try {
|
|
LinkedList<i> linkedList = aVar.c;
|
|
if (linkedList != null && linkedList.size() > 0 && aVar.e < aVar.c.size()) {
|
|
i iVar = aVar.c.get(aVar.e);
|
|
aVar.e++;
|
|
if (aVar.a(iVar)) {
|
|
aVar.a(iVar.a(), iVar.b(), false);
|
|
}
|
|
} else {
|
|
LinkedList<i> linkedList2 = aVar.d;
|
|
if (linkedList2 != null && linkedList2.size() > 0 && aVar.f < aVar.d.size()) {
|
|
i iVar2 = aVar.d.get(aVar.f);
|
|
aVar.f++;
|
|
if (aVar.a(iVar2)) {
|
|
aVar.a(iVar2.a(), iVar2.b(), true);
|
|
}
|
|
}
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("LoopTimer", th.getMessage(), th);
|
|
}
|
|
}
|
|
}
|