mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 21:24:42 +00:00
Update SQLCipher to 4.5.3-FTS-S1
This commit is contained in:
@@ -95,7 +95,6 @@ public class JobDatabase extends SQLiteOpenHelper implements SignalDatabaseOpenH
|
||||
if (instance == null) {
|
||||
SqlCipherLibraryLoader.load();
|
||||
instance = new JobDatabase(context, DatabaseSecretProvider.getOrCreateDatabaseSecret(context));
|
||||
instance.setWriteAheadLoggingEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,7 +102,7 @@ public class JobDatabase extends SQLiteOpenHelper implements SignalDatabaseOpenH
|
||||
}
|
||||
|
||||
public JobDatabase(@NonNull Application application, @NonNull DatabaseSecret databaseSecret) {
|
||||
super(application, DATABASE_NAME, databaseSecret.asString(), null, DATABASE_VERSION, 0, new SqlCipherErrorHandler(DATABASE_NAME), new SqlCipherDatabaseHook());
|
||||
super(application, DATABASE_NAME, databaseSecret.asString(), null, DATABASE_VERSION, 0, new SqlCipherErrorHandler(DATABASE_NAME), new SqlCipherDatabaseHook(), true);
|
||||
|
||||
this.application = application;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ public class KeyValueDatabase extends SQLiteOpenHelper implements SignalDatabase
|
||||
if (instance == null) {
|
||||
SqlCipherLibraryLoader.load();
|
||||
instance = new KeyValueDatabase(context, DatabaseSecretProvider.getOrCreateDatabaseSecret(context));
|
||||
instance.setWriteAheadLoggingEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,7 +67,7 @@ public class KeyValueDatabase extends SQLiteOpenHelper implements SignalDatabase
|
||||
|
||||
|
||||
private KeyValueDatabase(@NonNull Application application, @NonNull DatabaseSecret databaseSecret) {
|
||||
super(application, DATABASE_NAME, databaseSecret.asString(), null, DATABASE_VERSION, 0,new SqlCipherErrorHandler(DATABASE_NAME), new SqlCipherDatabaseHook());
|
||||
super(application, DATABASE_NAME, databaseSecret.asString(), null, DATABASE_VERSION, 0,new SqlCipherErrorHandler(DATABASE_NAME), new SqlCipherDatabaseHook(), true);
|
||||
|
||||
this.application = application;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,8 @@ class LocalMetricsDatabase private constructor(
|
||||
DATABASE_VERSION,
|
||||
0,
|
||||
SqlCipherDeletingErrorHandler(DATABASE_NAME),
|
||||
SqlCipherDatabaseHook()
|
||||
SqlCipherDatabaseHook(),
|
||||
true
|
||||
),
|
||||
SignalDatabaseOpenHelper {
|
||||
|
||||
@@ -83,7 +84,6 @@ class LocalMetricsDatabase private constructor(
|
||||
if (instance == null) {
|
||||
SqlCipherLibraryLoader.load()
|
||||
instance = LocalMetricsDatabase(context, DatabaseSecretProvider.getOrCreateDatabaseSecret(context))
|
||||
instance!!.setWriteAheadLoggingEnabled(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ class LogDatabase private constructor(
|
||||
DATABASE_VERSION,
|
||||
0,
|
||||
SqlCipherDeletingErrorHandler(DATABASE_NAME),
|
||||
SqlCipherDatabaseHook()
|
||||
SqlCipherDatabaseHook(),
|
||||
true
|
||||
),
|
||||
SignalDatabaseOpenHelper {
|
||||
|
||||
@@ -87,7 +88,6 @@ class LogDatabase private constructor(
|
||||
if (instance == null) {
|
||||
SqlCipherLibraryLoader.load()
|
||||
instance = LogDatabase(context, DatabaseSecretProvider.getOrCreateDatabaseSecret(context))
|
||||
instance!!.setWriteAheadLoggingEnabled(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ public class MegaphoneDatabase extends SQLiteOpenHelper implements SignalDatabas
|
||||
if (instance == null) {
|
||||
SqlCipherLibraryLoader.load();
|
||||
instance = new MegaphoneDatabase(context, DatabaseSecretProvider.getOrCreateDatabaseSecret(context));
|
||||
instance.setWriteAheadLoggingEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,7 +65,7 @@ public class MegaphoneDatabase extends SQLiteOpenHelper implements SignalDatabas
|
||||
}
|
||||
|
||||
public MegaphoneDatabase(@NonNull Application application, @NonNull DatabaseSecret databaseSecret) {
|
||||
super(application, DATABASE_NAME, databaseSecret.asString(), null, DATABASE_VERSION, 0, new SqlCipherErrorHandler(DATABASE_NAME), new SqlCipherDatabaseHook());
|
||||
super(application, DATABASE_NAME, databaseSecret.asString(), null, DATABASE_VERSION, 0, new SqlCipherErrorHandler(DATABASE_NAME), new SqlCipherDatabaseHook(), true);
|
||||
|
||||
this.application = application;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@ open class SignalDatabase(private val context: Application, databaseSecret: Data
|
||||
SignalDatabaseMigrations.DATABASE_VERSION,
|
||||
0,
|
||||
SqlCipherErrorHandler(DATABASE_NAME),
|
||||
SqlCipherDatabaseHook()
|
||||
SqlCipherDatabaseHook(),
|
||||
true
|
||||
),
|
||||
SignalDatabaseOpenHelper {
|
||||
|
||||
@@ -227,7 +228,6 @@ open class SignalDatabase(private val context: Application, databaseSecret: Data
|
||||
synchronized(SignalDatabase::class.java) {
|
||||
if (instance == null) {
|
||||
instance = SignalDatabase(application, databaseSecret, attachmentSecret)
|
||||
instance!!.setWriteAheadLoggingEnabled(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user