mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Introduce SignalDatabase as the main database entrypoint.
This commit is contained in:
@@ -16,7 +16,7 @@ import org.thoughtcrime.securesms.backup.BackupPassphrase;
|
||||
import org.thoughtcrime.securesms.backup.FullBackupBase;
|
||||
import org.thoughtcrime.securesms.backup.FullBackupImporter;
|
||||
import org.thoughtcrime.securesms.crypto.AttachmentSecretProvider;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase;
|
||||
import org.thoughtcrime.securesms.notifications.NotificationChannels;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -38,7 +38,7 @@ final class NewDeviceServerTask implements ServerTask {
|
||||
|
||||
EventBus.getDefault().register(this);
|
||||
try {
|
||||
SQLiteDatabase database = DatabaseFactory.getBackupDatabase(context);
|
||||
SQLiteDatabase database = SignalDatabase.getBackupDatabase();
|
||||
|
||||
String passphrase = "deadbeef";
|
||||
|
||||
@@ -49,7 +49,7 @@ final class NewDeviceServerTask implements ServerTask {
|
||||
inputStream,
|
||||
passphrase);
|
||||
|
||||
DatabaseFactory.upgradeRestored(context, database);
|
||||
SignalDatabase.upgradeRestored(database);
|
||||
NotificationChannels.restoreContactNotificationChannels(context);
|
||||
|
||||
AppInitialization.onPostBackupRestore(context);
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.signal.devicetransfer.ClientTask;
|
||||
import org.thoughtcrime.securesms.backup.FullBackupBase;
|
||||
import org.thoughtcrime.securesms.backup.FullBackupExporter;
|
||||
import org.thoughtcrime.securesms.crypto.AttachmentSecretProvider;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.net.DeviceTransferBlockingInterceptor;
|
||||
|
||||
@@ -41,7 +41,7 @@ final class OldDeviceClientTask implements ClientTask {
|
||||
try {
|
||||
FullBackupExporter.transfer(context,
|
||||
AttachmentSecretProvider.getInstance(context).getOrCreateAttachmentSecret(),
|
||||
DatabaseFactory.getBackupDatabase(context),
|
||||
SignalDatabase.getBackupDatabase(),
|
||||
outputStream,
|
||||
"deadbeef");
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user