导航菜单

页面标题

页面副标题

管控平台 v5.2.3.0. - b.java 源代码

正在查看: 管控平台 v5.2.3.0. 应用的 b.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package org.greenrobot.greendao.g;

import android.annotation.SuppressLint;
import android.content.Context;
import android.database.DatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import org.greenrobot.greendao.DaoException;

public abstract class b extends SQLiteOpenHelper {
    private final Context context;
    private a encryptedHelper;
    private boolean loadSQLCipherNativeLibs;
    private final String name;
    private final int version;

    interface a {
        org.greenrobot.greendao.g.a a(String str);

        org.greenrobot.greendao.g.a b(String str);

        org.greenrobot.greendao.g.a c(char[] cArr);

        org.greenrobot.greendao.g.a d(char[] cArr);
    }

    public b(Context context, String str, int i) {
        this(context, str, null, i);
    }

    private a checkEncryptedHelper() {
        if (this.encryptedHelper == null) {
            try {
                Class.forName("net.sqlcipher.database.SQLiteOpenHelper");
                try {
                    this.encryptedHelper = (a) Class.forName("org.greenrobot.greendao.g.f").getConstructor(b.class, Context.class, String.class, Integer.TYPE, Boolean.TYPE).newInstance(this, this.context, this.name, Integer.valueOf(this.version), Boolean.valueOf(this.loadSQLCipherNativeLibs));
                } catch (Exception e) {
                    throw new DaoException(e);
                }
            } catch (ClassNotFoundException unused) {
                throw new DaoException("Using an encrypted database requires SQLCipher, make sure to add it to dependencies: https://greenrobot.org/greendao/documentation/database-encryption/");
            }
        }
        return this.encryptedHelper;
    }

    public org.greenrobot.greendao.g.a getEncryptedReadableDb(String str) {
        return checkEncryptedHelper().b(str);
    }

    public org.greenrobot.greendao.g.a getEncryptedWritableDb(String str) {
        return checkEncryptedHelper().a(str);
    }

    public org.greenrobot.greendao.g.a getReadableDb() {
        return wrap(getReadableDatabase());
    }

    public org.greenrobot.greendao.g.a getWritableDb() {
        return wrap(getWritableDatabase());
    }

    @Override
    public void onCreate(SQLiteDatabase sQLiteDatabase) {
        onCreate(wrap(sQLiteDatabase));
    }

    public void onCreate(org.greenrobot.greendao.g.a aVar) {
    }

    @Override
    public void onOpen(SQLiteDatabase sQLiteDatabase) {
        onOpen(wrap(sQLiteDatabase));
    }

    public void onOpen(org.greenrobot.greendao.g.a aVar) {
    }

    @Override
    public void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i2) {
        onUpgrade(wrap(sQLiteDatabase), i, i2);
    }

    public void onUpgrade(org.greenrobot.greendao.g.a aVar, int i, int i2) {
    }

    public void setLoadSQLCipherNativeLibs(boolean z) {
        this.loadSQLCipherNativeLibs = z;
    }

    protected org.greenrobot.greendao.g.a wrap(SQLiteDatabase sQLiteDatabase) {
        return new g(sQLiteDatabase);
    }

    public b(Context context, String str, SQLiteDatabase.CursorFactory cursorFactory, int i) {
        super(context, str, cursorFactory, i);
        this.loadSQLCipherNativeLibs = true;
        this.context = context;
        this.name = str;
        this.version = i;
    }

    public org.greenrobot.greendao.g.a getEncryptedReadableDb(char[] cArr) {
        return checkEncryptedHelper().c(cArr);
    }

    public org.greenrobot.greendao.g.a getEncryptedWritableDb(char[] cArr) {
        return checkEncryptedHelper().d(cArr);
    }

    @SuppressLint({"NewApi"})
    public b(Context context, String str, SQLiteDatabase.CursorFactory cursorFactory, int i, DatabaseErrorHandler databaseErrorHandler) {
        super(context, str, cursorFactory, i, databaseErrorHandler);
        this.loadSQLCipherNativeLibs = true;
        this.context = context;
        this.name = str;
        this.version = i;
    }
}