package o;

import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteCursorDriver;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteQuery;
import java.io.Closeable;
import java.util.List;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class FC implements Closeable {
    public static final String[] n = {"", " OR ROLLBACK ", " OR ABORT ", " OR FAIL ", " OR IGNORE ", " OR REPLACE "};

    /* renamed from: o, reason: collision with root package name */
    public static final String[] f115o = new String[0];
    public final SQLiteDatabase l;
    public final List m;

    public FC(SQLiteDatabase sQLiteDatabase) {
        this.l = sQLiteDatabase;
        this.m = sQLiteDatabase.getAttachedDbs();
    }

    public final void b() {
        this.l.beginTransaction();
    }

    public final void c() {
        this.l.beginTransactionNonExclusive();
    }

    @Override // java.io.Closeable, java.lang.AutoCloseable
    public final void close() {
        this.l.close();
    }

    public final LC d(String str) {
        return new LC(this.l.compileStatement(str));
    }

    public final void f() {
        this.l.endTransaction();
    }

    public final void g(String str) throws SQLException {
        this.l.execSQL(str);
    }

    public final void j(Object[] objArr) throws SQLException {
        this.l.execSQL("INSERT OR REPLACE INTO `Preference` (`key`, `long_value`) VALUES (@key, @long_value)", objArr);
    }

    public final boolean l() {
        return this.l.inTransaction();
    }

    public final boolean m() {
        return this.l.isWriteAheadLoggingEnabled();
    }

    public final Cursor q(String str) {
        return u(new C2943xq(str, 3));
    }

    public final Cursor u(Jb0 jb0) {
        final EC ec = new EC(0, jb0);
        return this.l.rawQueryWithFactory(new SQLiteDatabase.CursorFactory() { // from class: o.DC
            @Override // android.database.sqlite.SQLiteDatabase.CursorFactory
            public final Cursor newCursor(SQLiteDatabase sQLiteDatabase, SQLiteCursorDriver sQLiteCursorDriver, String str, SQLiteQuery sQLiteQuery) {
                return (Cursor) ec.j(sQLiteDatabase, sQLiteCursorDriver, str, sQLiteQuery);
            }
        }, jb0.b(), f115o, null);
    }

    public final void w() {
        this.l.setTransactionSuccessful();
    }
}
