mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Use SqliteDatabase as default implementation.
This commit is contained in:
@@ -24,7 +24,7 @@ public class DatabaseModule {
|
||||
@Singleton
|
||||
Database<Connection> provideDatabase(DatabaseConfig config,
|
||||
MessageFactory messageFactory, Clock clock) {
|
||||
return new H2Database(config, messageFactory, clock);
|
||||
return new SqliteDatabase(config, messageFactory, clock);
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
@@ -150,7 +150,8 @@ public class AppModule {
|
||||
//FIXME: StrictMode
|
||||
StrictMode.ThreadPolicy tp = StrictMode.allowThreadDiskReads();
|
||||
StrictMode.allowThreadDiskWrites();
|
||||
File dbDir = app.getApplicationContext().getDir("db", MODE_PRIVATE);
|
||||
File dbDir = app.getApplicationContext().getDir("db_sqlite",
|
||||
MODE_PRIVATE);
|
||||
File keyDir = app.getApplicationContext().getDir("key", MODE_PRIVATE);
|
||||
StrictMode.setThreadPolicy(tp);
|
||||
KeyStrengthener keyStrengthener = SDK_INT >= 23
|
||||
|
||||
@@ -64,7 +64,7 @@ internal class HeadlessModule(private val appDir: File) {
|
||||
@Provides
|
||||
@Singleton
|
||||
internal fun provideDatabaseConfig(): DatabaseConfig {
|
||||
val dbDir = File(appDir, "db")
|
||||
val dbDir = File(appDir, "db_sqlite")
|
||||
val keyDir = File(appDir, "key")
|
||||
return HeadlessDatabaseConfig(dbDir, keyDir)
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ internal class HeadlessTestModule(private val appDir: File) {
|
||||
@Provides
|
||||
@Singleton
|
||||
internal fun provideDatabaseConfig(): DatabaseConfig {
|
||||
val dbDir = File(appDir, "db")
|
||||
val dbDir = File(appDir, "db_sqlite")
|
||||
val keyDir = File(appDir, "key")
|
||||
return HeadlessDatabaseConfig(dbDir, keyDir)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user