- 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
658 lines
30 KiB
Java
658 lines
30 KiB
Java
package com.mbridge.msdk.newreward.function.d;
|
|
|
|
import android.content.ContentValues;
|
|
import android.database.Cursor;
|
|
import android.database.sqlite.SQLiteDatabase;
|
|
import android.text.TextUtils;
|
|
import com.facebook.gamingservices.cloudgaming.internal.SDKAnalyticsEvents;
|
|
import com.mbridge.msdk.MBridgeConstans;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.entity.CampaignUnit;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.interstitial.view.MBInterstitialActivity;
|
|
import com.mbridge.msdk.newreward.function.common.DatabaseUtils;
|
|
import com.mbridge.msdk.newreward.function.common.JSONUtils;
|
|
import com.mbridge.msdk.newreward.function.common.MBridgeGlobalCommon;
|
|
import com.mbridge.msdk.newreward.function.common.MBridgeTaskManager;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class a {
|
|
private SQLiteDatabase a;
|
|
private final Object b = new Object();
|
|
|
|
public a(SQLiteDatabase sQLiteDatabase) {
|
|
this.a = sQLiteDatabase;
|
|
}
|
|
|
|
public final void b(int i, String str, String str2, String str3, boolean z, String str4, long j) {
|
|
SQLiteDatabase sQLiteDatabase;
|
|
Cursor query;
|
|
if (!DatabaseUtils.isDatabaseAvailable(this.a)) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "insert: database is not available");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
double d = com.mbridge.msdk.newreward.function.h.c.d(str4);
|
|
synchronized (this.b) {
|
|
try {
|
|
try {
|
|
query = this.a.query(MBInterstitialActivity.INTENT_CAMAPIGN, null, "ad_type=? and app_id=? and placement_id=? and unit_id=? and local_id=?", new String[]{String.valueOf(i), com.mbridge.msdk.foundation.controller.c.m().k(), str, str2, str3}, null, null, null);
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "insert: ", e);
|
|
}
|
|
sQLiteDatabase = this.a;
|
|
}
|
|
if (query != null && query.getCount() > 0) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.a("CampaignTable", "insert: already exist");
|
|
}
|
|
DatabaseUtils.closeCursor(query);
|
|
DatabaseUtils.endTransaction(this.a);
|
|
return;
|
|
}
|
|
DatabaseUtils.beginTransaction(this.a);
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("ad_type", Integer.valueOf(i));
|
|
contentValues.put("app_id", com.mbridge.msdk.foundation.controller.c.m().k());
|
|
contentValues.put("placement_id", str);
|
|
contentValues.put(MBridgeConstans.PROPERTIES_UNIT_ID, str2);
|
|
contentValues.put("local_id", str3);
|
|
contentValues.put("state", (Integer) 0);
|
|
contentValues.put("bid_token", str4);
|
|
contentValues.put("invalid_time", Long.valueOf(j));
|
|
contentValues.put("header_bidding", Integer.valueOf(z ? 1 : 0));
|
|
contentValues.put("load_start_time", Long.valueOf(System.currentTimeMillis()));
|
|
contentValues.put("ecppv", Double.valueOf(d));
|
|
contentValues.put(com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_SHOW_INDEX, (Integer) 0);
|
|
contentValues.put(com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_REQUEST_INDEX, (Integer) 0);
|
|
long insert = this.a.insert(MBInterstitialActivity.INTENT_CAMAPIGN, null, contentValues);
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.a("CampaignTable", "insert result: " + insert);
|
|
}
|
|
DatabaseUtils.setTransactionSuccessful(this.a);
|
|
sQLiteDatabase = this.a;
|
|
DatabaseUtils.endTransaction(sQLiteDatabase);
|
|
} catch (Throwable th) {
|
|
DatabaseUtils.endTransaction(this.a);
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void a(final com.mbridge.msdk.newreward.function.c.a.b bVar) {
|
|
MBridgeTaskManager.campaignTableExecute(new Runnable() { // from class: com.mbridge.msdk.newreward.function.d.a.2
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
a.this.b(bVar);
|
|
}
|
|
});
|
|
}
|
|
|
|
public final void b(com.mbridge.msdk.newreward.function.c.a.b bVar) {
|
|
SQLiteDatabase sQLiteDatabase;
|
|
if (bVar == null) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "insert: mBridgeCampaigns is null");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
List<com.mbridge.msdk.newreward.function.c.a.a> u = bVar.u();
|
|
if (u == null || u.isEmpty()) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "insert: campaignList is null or empty");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (!DatabaseUtils.isDatabaseAvailable(this.a)) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "insert: database is not available");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
synchronized (this.b) {
|
|
try {
|
|
try {
|
|
DatabaseUtils.beginTransaction(this.a);
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("request_id", bVar.f());
|
|
contentValues.put(SDKAnalyticsEvents.PARAMETER_SESSION_ID, bVar.k());
|
|
contentValues.put("system_id", bVar.l());
|
|
contentValues.put("backup_id", bVar.m());
|
|
contentValues.put("state", Integer.valueOf(bVar.j()));
|
|
contentValues.put("template", Integer.valueOf(bVar.o()));
|
|
contentValues.put("invalid_time", Long.valueOf(bVar.p()));
|
|
contentValues.put("invalid_time_2", Long.valueOf(bVar.q()));
|
|
contentValues.put("invalid_time_backup", Long.valueOf(bVar.r()));
|
|
contentValues.put("show_count", Integer.valueOf(bVar.t()));
|
|
contentValues.put(com.mbridge.msdk.foundation.entity.b.JSON_KEY_PARENT_SESSION_ID, bVar.n());
|
|
contentValues.put("token_rule", Integer.valueOf(bVar.G()));
|
|
contentValues.put(com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_SHOW_INDEX, Integer.valueOf(bVar.b()));
|
|
contentValues.put(com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_REQUEST_INDEX, Integer.valueOf(bVar.a()));
|
|
contentValues.put("data", bVar.v().toString());
|
|
long update = this.a.update(MBInterstitialActivity.INTENT_CAMAPIGN, contentValues, "ad_type=? and app_id=? and placement_id=? and unit_id=? and local_id=?", new String[]{String.valueOf(bVar.c()), com.mbridge.msdk.foundation.controller.c.m().k(), bVar.d(), bVar.e(), bVar.g()});
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.a("CampaignTable", "updateCampaign result: " + update);
|
|
}
|
|
DatabaseUtils.setTransactionSuccessful(this.a);
|
|
sQLiteDatabase = this.a;
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "updateCampaign: ", e);
|
|
}
|
|
sQLiteDatabase = this.a;
|
|
}
|
|
DatabaseUtils.endTransaction(sQLiteDatabase);
|
|
} catch (Throwable th) {
|
|
DatabaseUtils.endTransaction(this.a);
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void a(final int i, final String str, final String str2, final boolean z, final b bVar) {
|
|
MBridgeTaskManager.campaignTableExecute(new Runnable() { // from class: com.mbridge.msdk.newreward.function.d.a.3
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
List<com.mbridge.msdk.newreward.function.c.a.b> a = a.this.a(i, str, str2, z);
|
|
if (a == null || a.isEmpty()) {
|
|
b bVar2 = bVar;
|
|
if (bVar2 != null) {
|
|
bVar2.a();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
b bVar3 = bVar;
|
|
if (bVar3 != null) {
|
|
bVar3.a(a);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
public final List<com.mbridge.msdk.newreward.function.c.a.b> a(int i, String str, String str2, boolean z) {
|
|
Cursor cursor;
|
|
Cursor cursor2 = null;
|
|
if (!DatabaseUtils.isDatabaseAvailable(this.a)) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "find: database is not available");
|
|
}
|
|
return null;
|
|
}
|
|
synchronized (this.b) {
|
|
try {
|
|
cursor = this.a.query(MBInterstitialActivity.INTENT_CAMAPIGN, null, "ad_type=? and app_id=? and placement_id=? and unit_id=? and header_bidding=? and state in (401,404,405)", new String[]{String.valueOf(i), com.mbridge.msdk.foundation.controller.c.m().k(), str, str2, String.valueOf(z ? 1 : 0)}, null, null, "load_start_time desc");
|
|
try {
|
|
try {
|
|
List<com.mbridge.msdk.newreward.function.c.a.b> a = a(cursor);
|
|
if (a != null) {
|
|
if (a.size() == 0) {
|
|
}
|
|
DatabaseUtils.closeCursor(cursor);
|
|
return a;
|
|
}
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "find: mBridgeCampaigns is null or empty");
|
|
}
|
|
DatabaseUtils.closeCursor(cursor);
|
|
return a;
|
|
} catch (Exception e) {
|
|
e = e;
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "find: ", e);
|
|
}
|
|
DatabaseUtils.closeCursor(cursor);
|
|
return null;
|
|
}
|
|
} catch (Throwable th) {
|
|
th = th;
|
|
cursor2 = cursor;
|
|
DatabaseUtils.closeCursor(cursor2);
|
|
throw th;
|
|
}
|
|
} catch (Exception e2) {
|
|
e = e2;
|
|
cursor = null;
|
|
} catch (Throwable th2) {
|
|
th = th2;
|
|
DatabaseUtils.closeCursor(cursor2);
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public final List<com.mbridge.msdk.newreward.function.c.a.b> a(int i, String str, String str2, boolean z, int i2, String str3) {
|
|
String str4;
|
|
String[] strArr;
|
|
Cursor cursor = null;
|
|
if (!DatabaseUtils.isDatabaseAvailable(this.a)) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "find: database is not available");
|
|
}
|
|
return null;
|
|
}
|
|
synchronized (this.b) {
|
|
try {
|
|
String valueOf = String.valueOf(z ? 1 : 0);
|
|
long currentTimeMillis = System.currentTimeMillis();
|
|
String k = com.mbridge.msdk.foundation.controller.c.m().k();
|
|
if (TextUtils.isEmpty(str3)) {
|
|
try {
|
|
try {
|
|
str4 = "ad_type=? and app_id=? and placement_id=? and unit_id=? and header_bidding=? and state=? and invalid_time>?";
|
|
strArr = new String[]{String.valueOf(i), k, str, str2, valueOf, String.valueOf(3), String.valueOf(currentTimeMillis)};
|
|
} catch (Exception e) {
|
|
e = e;
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "find: ", e);
|
|
}
|
|
DatabaseUtils.closeCursor(cursor);
|
|
return null;
|
|
}
|
|
} catch (Throwable th) {
|
|
th = th;
|
|
DatabaseUtils.closeCursor(cursor);
|
|
throw th;
|
|
}
|
|
} else {
|
|
strArr = new String[]{str3, String.valueOf(i), k, str, str2, valueOf, String.valueOf(3), String.valueOf(currentTimeMillis)};
|
|
str4 = "local_id=? and ad_type=? and app_id=? and placement_id=? and unit_id=? and header_bidding=? and state=? and invalid_time>?";
|
|
}
|
|
cursor = this.a.query(MBInterstitialActivity.INTENT_CAMAPIGN, null, str4, strArr, null, null, "load_start_time desc", String.valueOf(i2 <= 0 ? Integer.MAX_VALUE : i2));
|
|
List<com.mbridge.msdk.newreward.function.c.a.b> a = a(cursor);
|
|
if ((a == null || a.size() == 0) && MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "find: mBridgeCampaigns is null or empty");
|
|
}
|
|
DatabaseUtils.closeCursor(cursor);
|
|
return a;
|
|
} catch (Exception e2) {
|
|
e = e2;
|
|
cursor = null;
|
|
} catch (Throwable th2) {
|
|
th = th2;
|
|
cursor = null;
|
|
DatabaseUtils.closeCursor(cursor);
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void a(int i, String str, String str2, String str3, int i2) {
|
|
MBridgeTaskManager.campaignTableExecute(b(i, str, str2, str3, i2, null));
|
|
}
|
|
|
|
public final void a(int i, String str, String str2, String str3, int i2, com.mbridge.msdk.newreward.function.c.a.b bVar) {
|
|
MBridgeTaskManager.campaignTableExecute(b(i, str, str2, str3, i2, bVar));
|
|
}
|
|
|
|
private Runnable b(final int i, final String str, final String str2, final String str3, final int i2, final com.mbridge.msdk.newreward.function.c.a.b bVar) {
|
|
return new Runnable() { // from class: com.mbridge.msdk.newreward.function.d.a.5
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
com.mbridge.msdk.newreward.function.c.a.b bVar2 = bVar;
|
|
if (bVar2 != null) {
|
|
List<com.mbridge.msdk.newreward.function.c.a.b> a = a.this.a(bVar2.c(), bVar.d(), bVar.e(), bVar.i(), 0, bVar.g());
|
|
if (bVar.a() <= 0 || a == null || a.isEmpty()) {
|
|
if (bVar.a() != 0 || a == null || a.isEmpty() || a.get(0).t() <= 0) {
|
|
a.this.b(i, str, str2, str3, i2);
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
a.this.b(i, str, str2, str3, i2);
|
|
}
|
|
};
|
|
}
|
|
|
|
public final void b(int i, String str, String str2, String str3, int i2) {
|
|
SQLiteDatabase sQLiteDatabase;
|
|
if (!DatabaseUtils.isDatabaseAvailable(this.a)) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "updateState: database is not available");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
synchronized (this.b) {
|
|
try {
|
|
try {
|
|
DatabaseUtils.beginTransaction(this.a);
|
|
ContentValues contentValues = new ContentValues();
|
|
contentValues.put("state", Integer.valueOf(i2));
|
|
int update = this.a.update(MBInterstitialActivity.INTENT_CAMAPIGN, contentValues, "ad_type=? and app_id=? and placement_id=? and unit_id=? and local_id=?", new String[]{String.valueOf(i), com.mbridge.msdk.foundation.controller.c.m().k(), str, str2, str3});
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.a("CampaignTable", "updateState result: " + update);
|
|
}
|
|
DatabaseUtils.setTransactionSuccessful(this.a);
|
|
sQLiteDatabase = this.a;
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "updateState: ", e);
|
|
}
|
|
sQLiteDatabase = this.a;
|
|
}
|
|
DatabaseUtils.endTransaction(sQLiteDatabase);
|
|
} catch (Throwable th) {
|
|
DatabaseUtils.endTransaction(this.a);
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void b(final int i, final String str, final String str2) {
|
|
MBridgeTaskManager.campaignTableExecute(new Runnable() { // from class: com.mbridge.msdk.newreward.function.d.a.7
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
a.this.c(i, str, str2);
|
|
}
|
|
});
|
|
}
|
|
|
|
public final void c(int i, String str, String str2) {
|
|
SQLiteDatabase sQLiteDatabase;
|
|
if (!DatabaseUtils.isDatabaseAvailable(this.a)) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "clearLoadCheckCampaigns: database is not available");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
synchronized (this.b) {
|
|
try {
|
|
try {
|
|
DatabaseUtils.beginTransaction(this.a);
|
|
int delete = this.a.delete(MBInterstitialActivity.INTENT_CAMAPIGN, "ad_type=? and app_id=? and placement_id=? and unit_id=? and state in (0,405,401,404);", new String[]{String.valueOf(i), com.mbridge.msdk.foundation.controller.c.m().k(), str, str2});
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.a("CampaignTable", "clearLoadCheckCampaigns result: " + delete);
|
|
}
|
|
DatabaseUtils.setTransactionSuccessful(this.a);
|
|
sQLiteDatabase = this.a;
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "clearLoadCheckCampaigns: ", e);
|
|
}
|
|
sQLiteDatabase = this.a;
|
|
}
|
|
DatabaseUtils.endTransaction(sQLiteDatabase);
|
|
} catch (Throwable th) {
|
|
DatabaseUtils.endTransaction(this.a);
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void d(int i, String str, String str2) {
|
|
SQLiteDatabase sQLiteDatabase;
|
|
if (!DatabaseUtils.isDatabaseAvailable(this.a)) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "clearUnInvalidCampaign: database is not available");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
synchronized (this.b) {
|
|
try {
|
|
try {
|
|
DatabaseUtils.beginTransaction(this.a);
|
|
int delete = this.a.delete(MBInterstitialActivity.INTENT_CAMAPIGN, a(), new String[]{String.valueOf(i), com.mbridge.msdk.foundation.controller.c.m().k(), str, str2, String.valueOf(System.currentTimeMillis())});
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.a("CampaignTable", "clearUnInvalidCampaign result: " + delete);
|
|
}
|
|
DatabaseUtils.setTransactionSuccessful(this.a);
|
|
sQLiteDatabase = this.a;
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "clearUnInvalidCampaign: ", e);
|
|
}
|
|
sQLiteDatabase = this.a;
|
|
}
|
|
DatabaseUtils.endTransaction(sQLiteDatabase);
|
|
} catch (Throwable th) {
|
|
DatabaseUtils.endTransaction(this.a);
|
|
throw th;
|
|
}
|
|
}
|
|
}
|
|
|
|
public final List<String> e(int i, String str, String str2) {
|
|
Cursor query;
|
|
Cursor cursor = null;
|
|
if (!DatabaseUtils.isDatabaseAvailable(this.a)) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "database is not available");
|
|
}
|
|
return null;
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
synchronized (this.b) {
|
|
try {
|
|
try {
|
|
try {
|
|
query = this.a.query(MBInterstitialActivity.INTENT_CAMAPIGN, null, a(), new String[]{String.valueOf(i), com.mbridge.msdk.foundation.controller.c.m().k(), str, str2, String.valueOf(System.currentTimeMillis())}, null, null, null, null);
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
} catch (Exception e) {
|
|
e = e;
|
|
}
|
|
if (query != null) {
|
|
try {
|
|
} catch (Exception e2) {
|
|
e = e2;
|
|
cursor = query;
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "find: ", e);
|
|
}
|
|
DatabaseUtils.closeCursor(cursor);
|
|
return arrayList;
|
|
} catch (Throwable th2) {
|
|
th = th2;
|
|
cursor = query;
|
|
DatabaseUtils.closeCursor(cursor);
|
|
throw th;
|
|
}
|
|
if (query.getCount() > 0) {
|
|
int columnIndex = query.getColumnIndex("local_id");
|
|
while (query.moveToNext()) {
|
|
String string = query.getString(columnIndex);
|
|
if (!TextUtils.isEmpty(string)) {
|
|
arrayList.add(string);
|
|
}
|
|
}
|
|
DatabaseUtils.closeCursor(query);
|
|
return arrayList;
|
|
}
|
|
}
|
|
DatabaseUtils.closeCursor(query);
|
|
return null;
|
|
} catch (Throwable th3) {
|
|
th = th3;
|
|
}
|
|
}
|
|
}
|
|
|
|
private static String a() {
|
|
return "ad_type=? and app_id=? and placement_id=? and unit_id=? and (state in (6,402,406,403,8,7) or invalid_time<? )";
|
|
}
|
|
|
|
private static List<com.mbridge.msdk.newreward.function.c.a.b> a(Cursor cursor) {
|
|
Cursor cursor2 = cursor;
|
|
if (cursor2 == null || cursor.getCount() <= 0) {
|
|
return null;
|
|
}
|
|
try {
|
|
ArrayList arrayList = new ArrayList();
|
|
int columnIndex = cursor2.getColumnIndex("ad_type");
|
|
int columnIndex2 = cursor2.getColumnIndex("app_id");
|
|
int columnIndex3 = cursor2.getColumnIndex("placement_id");
|
|
int columnIndex4 = cursor2.getColumnIndex(MBridgeConstans.PROPERTIES_UNIT_ID);
|
|
int columnIndex5 = cursor2.getColumnIndex("request_id");
|
|
int columnIndex6 = cursor2.getColumnIndex("local_id");
|
|
int columnIndex7 = cursor2.getColumnIndex("bid_token");
|
|
int columnIndex8 = cursor2.getColumnIndex("header_bidding");
|
|
int columnIndex9 = cursor2.getColumnIndex("load_start_time");
|
|
int columnIndex10 = cursor2.getColumnIndex("backup_id");
|
|
int columnIndex11 = cursor2.getColumnIndex("state");
|
|
int columnIndex12 = cursor2.getColumnIndex("template");
|
|
int columnIndex13 = cursor2.getColumnIndex("invalid_time");
|
|
int columnIndex14 = cursor2.getColumnIndex("invalid_time_2");
|
|
ArrayList arrayList2 = arrayList;
|
|
int columnIndex15 = cursor2.getColumnIndex("invalid_time_backup");
|
|
int columnIndex16 = cursor2.getColumnIndex("ecppv");
|
|
int columnIndex17 = cursor2.getColumnIndex(SDKAnalyticsEvents.PARAMETER_SESSION_ID);
|
|
int i = columnIndex14;
|
|
int columnIndex18 = cursor2.getColumnIndex("system_id");
|
|
int i2 = columnIndex13;
|
|
int columnIndex19 = cursor2.getColumnIndex("show_count");
|
|
int columnIndex20 = cursor2.getColumnIndex(com.mbridge.msdk.foundation.entity.b.JSON_KEY_PARENT_SESSION_ID);
|
|
int columnIndex21 = cursor2.getColumnIndex("data");
|
|
int columnIndex22 = cursor2.getColumnIndex("token_rule");
|
|
int columnIndex23 = cursor2.getColumnIndex(com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_SHOW_INDEX);
|
|
int columnIndex24 = cursor2.getColumnIndex(com.mbridge.msdk.foundation.entity.b.JSON_KEY_SECOND_REQUEST_INDEX);
|
|
while (cursor.moveToNext()) {
|
|
int i3 = columnIndex24;
|
|
int i4 = columnIndex;
|
|
int i5 = columnIndex2;
|
|
int i6 = columnIndex3;
|
|
int i7 = columnIndex4;
|
|
com.mbridge.msdk.newreward.function.c.a.b bVar = new com.mbridge.msdk.newreward.function.c.a.b(cursor2.getInt(columnIndex), cursor2.getString(columnIndex2), cursor2.getString(columnIndex3), cursor2.getString(columnIndex4));
|
|
bVar.a(cursor2.getString(columnIndex5));
|
|
bVar.b(cursor2.getString(columnIndex6));
|
|
String string = cursor2.getString(columnIndex7);
|
|
bVar.c(string);
|
|
boolean z = true;
|
|
if (cursor2.getInt(columnIndex8) != 1) {
|
|
z = false;
|
|
}
|
|
bVar.a(z);
|
|
bVar.e(cursor2.getLong(columnIndex9));
|
|
bVar.d(cursor2.getString(columnIndex17));
|
|
bVar.e(cursor2.getString(columnIndex18));
|
|
bVar.f(cursor2.getString(columnIndex10));
|
|
bVar.c(cursor2.getInt(columnIndex11));
|
|
bVar.d(cursor2.getInt(columnIndex12));
|
|
int i8 = columnIndex18;
|
|
int i9 = columnIndex17;
|
|
int i10 = i2;
|
|
bVar.b(cursor2.getLong(i10));
|
|
i2 = i10;
|
|
int i11 = i;
|
|
bVar.c(cursor2.getLong(i11));
|
|
i = i11;
|
|
int i12 = columnIndex15;
|
|
bVar.d(cursor2.getLong(i12));
|
|
columnIndex15 = i12;
|
|
int i13 = columnIndex16;
|
|
bVar.a(cursor2.getDouble(i13));
|
|
int i14 = columnIndex19;
|
|
bVar.e(cursor2.getInt(i14));
|
|
columnIndex16 = i13;
|
|
int i15 = columnIndex20;
|
|
bVar.g(cursor2.getString(i15));
|
|
int i16 = columnIndex22;
|
|
bVar.k(cursor2.getInt(i16));
|
|
columnIndex22 = i16;
|
|
int i17 = columnIndex23;
|
|
bVar.b(cursor2.getInt(i17));
|
|
columnIndex23 = i17;
|
|
bVar.a(cursor2.getInt(i3));
|
|
int i18 = columnIndex21;
|
|
JSONObject parse = JSONUtils.parse(cursor2.getString(i18));
|
|
bVar.a(parse);
|
|
ArrayList arrayList3 = arrayList2;
|
|
arrayList3.add(bVar);
|
|
CampaignUnit parseCampaignUnit = com.mbridge.msdk.foundation.entity.b.parseCampaignUnit(parse, string);
|
|
if (parseCampaignUnit != null) {
|
|
ArrayList arrayList4 = new ArrayList();
|
|
ArrayList<CampaignEx> ads = parseCampaignUnit.getAds();
|
|
if (ads != null) {
|
|
columnIndex21 = i18;
|
|
MBridgeGlobalCommon.handlerCampaigns(bVar.g(), bVar, ads, arrayList4);
|
|
bVar.b(ads);
|
|
bVar.a(arrayList4);
|
|
cursor2 = cursor;
|
|
arrayList2 = arrayList3;
|
|
columnIndex20 = i15;
|
|
columnIndex18 = i8;
|
|
columnIndex17 = i9;
|
|
columnIndex24 = i3;
|
|
columnIndex = i4;
|
|
columnIndex3 = i6;
|
|
columnIndex4 = i7;
|
|
columnIndex19 = i14;
|
|
columnIndex2 = i5;
|
|
}
|
|
}
|
|
cursor2 = cursor;
|
|
arrayList2 = arrayList3;
|
|
columnIndex21 = i18;
|
|
columnIndex20 = i15;
|
|
columnIndex18 = i8;
|
|
columnIndex17 = i9;
|
|
columnIndex24 = i3;
|
|
columnIndex = i4;
|
|
columnIndex3 = i6;
|
|
columnIndex4 = i7;
|
|
columnIndex19 = i14;
|
|
columnIndex2 = i5;
|
|
}
|
|
return arrayList2;
|
|
} catch (Exception e) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
af.b("CampaignTable", "parseCampaignTable: ", e);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public final void a(final int i, final String str, final String str2, final String str3, final boolean z, final String str4, final long j) {
|
|
MBridgeTaskManager.campaignTableExecute(new Runnable() { // from class: com.mbridge.msdk.newreward.function.d.a.1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
a.this.b(i, str, str2, str3, z, str4, j);
|
|
}
|
|
});
|
|
}
|
|
|
|
public final void a(final int i, final String str, final String str2, final boolean z, final int i2, final b bVar) {
|
|
MBridgeTaskManager.campaignTableExecute(new Runnable() { // from class: com.mbridge.msdk.newreward.function.d.a.4
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
List<com.mbridge.msdk.newreward.function.c.a.b> a = a.this.a(i, str, str2, z, i2, "");
|
|
if (a == null || a.size() == 0) {
|
|
b bVar2 = bVar;
|
|
if (bVar2 != null) {
|
|
bVar2.a();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
b bVar3 = bVar;
|
|
if (bVar3 != null) {
|
|
bVar3.a(a);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
public final void a(final int i, final String str, final String str2) {
|
|
MBridgeTaskManager.campaignTableExecute(new Runnable() { // from class: com.mbridge.msdk.newreward.function.d.a.6
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
a.this.d(i, str, str2);
|
|
}
|
|
});
|
|
}
|
|
}
|