package net.zetetic.database.sqlcipher;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes3.dex */
public final class SQLiteQuery extends net.zetetic.database.sqlcipher.SQLiteProgram {
    private final android.os.CancellationSignal i;

    SQLiteQuery(net.zetetic.database.sqlcipher.SQLiteDatabase sQLiteDatabase, java.lang.String str, android.os.CancellationSignal cancellationSignal) {
        super(sQLiteDatabase, str, null, cancellationSignal);
        this.i = cancellationSignal;
    }

    int R(net.zetetic.database.CursorWindow cursorWindow, int i, int i2, boolean z) {
        a();
        try {
            try {
                cursorWindow.a();
                try {
                    try {
                        int iH = E().h(G(), v(), cursorWindow, i, i2, z, y(), this.i);
                        cursorWindow.e();
                        e();
                        return iH;
                    } catch (android.database.sqlite.SQLiteDatabaseCorruptException e) {
                        e = e;
                        android.database.sqlite.SQLiteDatabaseCorruptException sQLiteDatabaseCorruptException = e;
                        O(sQLiteDatabaseCorruptException);
                        throw sQLiteDatabaseCorruptException;
                    } catch (android.database.sqlite.SQLiteException e2) {
                        e = e2;
                        android.database.sqlite.SQLiteException sQLiteException = e;
                        net.zetetic.database.Logger.b("SQLiteQuery", "exception: " + sQLiteException.getMessage() + "; query: " + G());
                        throw sQLiteException;
                    }
                } catch (android.database.sqlite.SQLiteDatabaseCorruptException e5) {
                    e = e5;
                } catch (android.database.sqlite.SQLiteException e6) {
                    e = e6;
                } catch (java.lang.Throwable th) {
                    th = th;
                    java.lang.Throwable th2 = th;
                    cursorWindow.e();
                    throw th2;
                }
            } catch (java.lang.Throwable th3) {
                e();
                throw th3;
            }
        } catch (java.lang.Throwable th4) {
            th = th4;
        }
    }

    public java.lang.String toString() {
        return "SQLiteQuery: " + G();
    }
}
