- 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
156 lines
5.3 KiB
Java
156 lines
5.3 KiB
Java
package com.mbridge.msdk.tracker;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.content.Context;
|
|
import android.database.Cursor;
|
|
import android.net.ConnectivityManager;
|
|
import android.net.NetworkInfo;
|
|
import android.util.Log;
|
|
import androidx.work.PeriodicWorkRequest;
|
|
import com.ironsource.mediationsdk.utils.IronSourceConstants;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.source.chunk.ChunkedTrackBlacklistUtil;
|
|
import com.unity3d.ads.core.domain.HandleInvocationsFromAdViewer;
|
|
import com.unity3d.services.UnityAdsConstants;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
final class y {
|
|
public static long a(int i, long j, long j2) {
|
|
if (i <= 0 || j == 0 || i <= 10) {
|
|
return j2;
|
|
}
|
|
if (i <= 20) {
|
|
return ChunkedTrackBlacklistUtil.DEFAULT_TRACK_BLACKLIST_MS;
|
|
}
|
|
if (i <= 30) {
|
|
return UnityAdsConstants.Timeout.INIT_TIMEOUT_MS;
|
|
}
|
|
if (i <= 40) {
|
|
return 180000L;
|
|
}
|
|
if (i <= 50) {
|
|
return 240000L;
|
|
}
|
|
return PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS;
|
|
}
|
|
|
|
public static boolean a(Object obj) {
|
|
return obj == null;
|
|
}
|
|
|
|
public static boolean b(Object obj) {
|
|
return obj != null;
|
|
}
|
|
|
|
public static boolean a(List<?> list) {
|
|
return list == null || list.size() == 0;
|
|
}
|
|
|
|
public static boolean b(List<i> list) {
|
|
if (a((List<?>) list)) {
|
|
return false;
|
|
}
|
|
for (i iVar : list) {
|
|
if (!a(iVar)) {
|
|
e c = iVar.c();
|
|
if (!a(c) && c.c() == 1) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public static void a(Cursor cursor) {
|
|
try {
|
|
if (!b((Object) cursor) || cursor.isClosed()) {
|
|
return;
|
|
}
|
|
cursor.close();
|
|
} catch (Exception unused) {
|
|
}
|
|
}
|
|
|
|
public static List<i> b(Cursor cursor) {
|
|
int i;
|
|
int i2;
|
|
ArrayList arrayList = new ArrayList();
|
|
try {
|
|
int columnIndex = cursor.getColumnIndex("name");
|
|
int columnIndex2 = cursor.getColumnIndex("type");
|
|
int columnIndex3 = cursor.getColumnIndex("time_stamp");
|
|
int columnIndex4 = cursor.getColumnIndex("properties");
|
|
int columnIndex5 = cursor.getColumnIndex(HandleInvocationsFromAdViewer.KEY_DOWNLOAD_PRIORITY);
|
|
int columnIndex6 = cursor.getColumnIndex("uuid");
|
|
int columnIndex7 = cursor.getColumnIndex(IronSourceConstants.EVENTS_DURATION);
|
|
int columnIndex8 = cursor.getColumnIndex("state");
|
|
int columnIndex9 = cursor.getColumnIndex("report_count");
|
|
int columnIndex10 = cursor.getColumnIndex("ignore_max_timeout");
|
|
int columnIndex11 = cursor.getColumnIndex("ignore_max_retry_times");
|
|
int columnIndex12 = cursor.getColumnIndex("invalid_time");
|
|
while (cursor.moveToNext()) {
|
|
try {
|
|
e eVar = new e(cursor.getString(columnIndex));
|
|
eVar.a(cursor.getInt(columnIndex2));
|
|
i = columnIndex;
|
|
i2 = columnIndex2;
|
|
try {
|
|
eVar.a(cursor.getLong(columnIndex3));
|
|
eVar.a(new JSONObject(cursor.getString(columnIndex4)));
|
|
eVar.b(cursor.getInt(columnIndex5));
|
|
eVar.a(cursor.getString(columnIndex6));
|
|
eVar.b(cursor.getLong(columnIndex7));
|
|
i iVar = new i(eVar);
|
|
iVar.b(cursor.getInt(columnIndex8));
|
|
iVar.a(cursor.getInt(columnIndex9));
|
|
iVar.a(cursor.getInt(columnIndex10) == 0);
|
|
iVar.b(cursor.getInt(columnIndex11) == 0);
|
|
iVar.a(cursor.getLong(columnIndex12));
|
|
arrayList.add(iVar);
|
|
} catch (JSONException e) {
|
|
e = e;
|
|
if (a.a) {
|
|
Log.e("TrackManager", "create: ", e);
|
|
}
|
|
columnIndex = i;
|
|
columnIndex2 = i2;
|
|
}
|
|
} catch (JSONException e2) {
|
|
e = e2;
|
|
i = columnIndex;
|
|
i2 = columnIndex2;
|
|
}
|
|
columnIndex = i;
|
|
columnIndex2 = i2;
|
|
}
|
|
} catch (Exception unused) {
|
|
}
|
|
return arrayList;
|
|
}
|
|
|
|
@SuppressLint({"MissingPermission"})
|
|
public static boolean a(Context context) {
|
|
ConnectivityManager connectivityManager;
|
|
if (context == null) {
|
|
return true;
|
|
}
|
|
NetworkInfo networkInfo = null;
|
|
try {
|
|
connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
|
|
} catch (Exception unused) {
|
|
connectivityManager = null;
|
|
}
|
|
if (connectivityManager == null) {
|
|
return true;
|
|
}
|
|
try {
|
|
networkInfo = connectivityManager.getActiveNetworkInfo();
|
|
} catch (Exception unused2) {
|
|
}
|
|
return networkInfo != null && networkInfo.isConnected();
|
|
}
|
|
}
|