Files
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

83 lines
2.6 KiB
Java

package com.mbridge.msdk.foundation.db;
import android.content.ContentValues;
import android.database.Cursor;
import com.vungle.ads.internal.signals.SignalManager;
/* loaded from: classes4.dex */
public final class i extends a<com.mbridge.msdk.foundation.entity.f> {
private static i a;
private i(f fVar) {
super(fVar);
}
public static synchronized i a(f fVar) {
i iVar;
synchronized (i.class) {
try {
if (a == null) {
a = new i(fVar);
}
iVar = a;
} catch (Throwable th) {
throw th;
}
}
return iVar;
}
public final synchronized void a(String str) {
try {
String[] strArr = {String.valueOf(System.currentTimeMillis() - SignalManager.TWENTY_FOUR_HOURS_MILLIS), str};
if (getWritableDatabase() != null) {
getWritableDatabase().delete("fq_info", "time< ? and unitId=?", strArr);
}
} catch (Exception unused) {
}
}
public final synchronized void a(com.mbridge.msdk.foundation.entity.f fVar) {
try {
try {
} catch (Exception e) {
e.printStackTrace();
}
if (getWritableDatabase() == null) {
return;
}
if (fVar != null) {
ContentValues contentValues = new ContentValues();
contentValues.put("id", fVar.a());
contentValues.put("time", Long.valueOf(fVar.b()));
contentValues.put("unitId", fVar.d());
contentValues.put("type", Integer.valueOf(fVar.c()));
if (a(fVar.d(), fVar.a())) {
getWritableDatabase().update("fq_info", contentValues, "id = ? AND unitId = ? ", new String[]{fVar.a(), fVar.d()});
} else {
getWritableDatabase().insert("fq_info", null, contentValues);
}
}
} catch (Throwable th) {
throw th;
}
}
private synchronized boolean a(String str, String str2) {
try {
Cursor rawQuery = getReadableDatabase().rawQuery("select id from fq_info where unitId= ? and id= ? ", new String[]{str, str2});
if (rawQuery != null && rawQuery.getCount() > 0) {
rawQuery.close();
return true;
}
if (rawQuery != null) {
rawQuery.close();
}
return false;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
}