package p0; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.text.TextUtils; import android.util.Log; import android.util.Pair; import java.io.Closeable; import java.io.File; import java.io.IOException; import java.util.Iterator; import java.util.List; /* loaded from: classes.dex */ public interface c extends Closeable { public static abstract class a { /* renamed from: a, reason: collision with root package name */ public final int f12900a; public a(int i10) { this.f12900a = i10; } private void a(String str) { if (str.equalsIgnoreCase(":memory:") || str.trim().length() == 0) { return; } Log.w("SupportSQLite", "deleting the database file: " + str); try { SQLiteDatabase.deleteDatabase(new File(str)); } catch (Exception e10) { Log.w("SupportSQLite", "delete failed: ", e10); } } public void b(p0.b bVar) { } public void c(p0.b bVar) { Log.e("SupportSQLite", "Corruption reported by sqlite on database: " + bVar.o0()); if (!bVar.isOpen()) { a(bVar.o0()); return; } List list = null; try { try { list = bVar.A(); } finally { if (list != null) { Iterator it = list.iterator(); while (it.hasNext()) { a((String) ((Pair) it.next()).second); } } else { a(bVar.o0()); } } } catch (SQLiteException unused) { } try { bVar.close(); } catch (IOException unused2) { } } public abstract void d(p0.b bVar); public abstract void e(p0.b bVar, int i10, int i11); public void f(p0.b bVar) { } public abstract void g(p0.b bVar, int i10, int i11); } public static class b { /* renamed from: a, reason: collision with root package name */ public final Context f12901a; /* renamed from: b, reason: collision with root package name */ public final String f12902b; /* renamed from: c, reason: collision with root package name */ public final a f12903c; /* renamed from: d, reason: collision with root package name */ public final boolean f12904d; public static class a { /* renamed from: a, reason: collision with root package name */ Context f12905a; /* renamed from: b, reason: collision with root package name */ String f12906b; /* renamed from: c, reason: collision with root package name */ a f12907c; /* renamed from: d, reason: collision with root package name */ boolean f12908d; a(Context context) { this.f12905a = context; } public b a() { if (this.f12907c == null) { throw new IllegalArgumentException("Must set a callback to create the configuration."); } if (this.f12905a == null) { throw new IllegalArgumentException("Must set a non-null context to create the configuration."); } if (this.f12908d && TextUtils.isEmpty(this.f12906b)) { throw new IllegalArgumentException("Must set a non-null database name to a configuration that uses the no backup directory."); } return new b(this.f12905a, this.f12906b, this.f12907c, this.f12908d); } public a b(a aVar) { this.f12907c = aVar; return this; } public a c(String str) { this.f12906b = str; return this; } public a d(boolean z10) { this.f12908d = z10; return this; } } b(Context context, String str, a aVar, boolean z10) { this.f12901a = context; this.f12902b = str; this.f12903c = aVar; this.f12904d = z10; } public static a a(Context context) { return new a(context); } } /* renamed from: p0.c$c, reason: collision with other inner class name */ public interface InterfaceC0208c { c a(b bVar); } p0.b b0(); @Override // java.io.Closeable, java.lang.AutoCloseable void close(); String getDatabaseName(); void setWriteAheadLoggingEnabled(boolean z10); }