Add a log section for remapped recipients.

This commit is contained in:
Greyson Parrelli
2021-11-05 15:57:13 -04:00
parent 011f6e6cf4
commit 5ba04936b1
4 changed files with 47 additions and 1 deletions

View File

@@ -182,7 +182,7 @@ public class DatabaseFactory {
return getInstance(context).storageIdDatabase;
}
static RemappedRecordsDatabase getRemappedRecordsDatabase(Context context) {
public static RemappedRecordsDatabase getRemappedRecordsDatabase(Context context) {
return getInstance(context).remappedRecordsDatabase;
}

View File

@@ -97,6 +97,14 @@ public class RemappedRecordsDatabase extends Database {
addMapping(Threads.TABLE_NAME, new Mapping(oldId, newId));
}
public Cursor getAllRecipients() {
return databaseHelper.getSignalReadableDatabase().query(Recipients.TABLE_NAME, null, null, null, null, null, null);
}
public Cursor getAllThreads() {
return databaseHelper.getSignalReadableDatabase().query(Threads.TABLE_NAME, null, null, null, null, null, null);
}
private @NonNull List<Mapping> getAllMappings(@NonNull String table) {
List<Mapping> mappings = new LinkedList<>();