@Override public Iterable<ChromeDevtoolsDomain> get() { return new Stetho.DefaultInspectorModulesBuilder(context) .provideDatabaseDriver(new SqliteDatabaseDriver(context, new DatabaseFilesProvider() { @Override public List<File> getDatabaseFiles() { List<File> list = new ArrayList<>(); list.add(new File(historian.dbPath())); return list; } }, new DatabaseConnectionProvider() { @Override public SQLiteDatabase openDatabase(File file) throws SQLiteException { return historian.getDatabase(); } })) .finish(); }
/** * @param context the context * @param databaseFilesProvider a database file name provider * @param databaseConnectionProvider a database connection provider */ public RongDatabaseDriver( Context context, DatabaseFilesProvider databaseFilesProvider, DatabaseConnectionProvider databaseConnectionProvider) { super(context); mDatabaseFilesProvider = databaseFilesProvider; mDatabaseConnectionProvider = databaseConnectionProvider; }
public RongDbFilesDumperPlugin(Context context, DatabaseFilesProvider databaseFilesProvider) { mContext = context; mDatabaseFilesProvider = databaseFilesProvider; }
public RongDatabaseDriver(Context context, DatabaseFilesProvider databaseFilesProvider, DatabaseConnectionProvider databaseConnectionProvider) { super(context, databaseFilesProvider, databaseConnectionProvider); }
/** * Customize the location of database files that Stetho will propogate in the UI. Android's * {@link Context#getDatabasePath} method will be used by default if not overridden here. * * <p>This method is deprecated and instead it is recommended that you explicitly * configure the {@link SqliteDatabaseDriver} as with:</p> * <pre> * provideDatabaseDriver( * new SqliteDatabaseDriver( * context, * new MyDatabaseFilesProvider(...), * new DefaultDatabaseConnectionProvider(...))) * </pre> * * @deprecated Use {@link #provideDatabaseDriver(DatabaseDriver2)} with * {@link SqliteDatabaseDriver} explicitly. */ @Deprecated public DefaultInspectorModulesBuilder databaseFiles(DatabaseFilesProvider provider) { mDatabaseFilesProvider = provider; return this; }