mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Introduce SignalDatabase as the main database entrypoint.
This commit is contained in:
@@ -6,7 +6,7 @@ import android.database.Cursor;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.signal.core.util.AsciiArt;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase;
|
||||
|
||||
/**
|
||||
* Renders data pertaining to sender key. While all private info is obfuscated, this is still only intended to be printed for internal users.
|
||||
@@ -23,12 +23,12 @@ public class LogSectionRemappedRecords implements LogSection {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
builder.append("--- Recipients").append("\n\n");
|
||||
try (Cursor cursor = DatabaseFactory.getRemappedRecordsDatabase(context).getAllRecipients()) {
|
||||
try (Cursor cursor = SignalDatabase.remappedRecords().getAllRecipients()) {
|
||||
builder.append(AsciiArt.tableFor(cursor)).append("\n\n");
|
||||
}
|
||||
|
||||
builder.append("--- Threads").append("\n\n");
|
||||
try (Cursor cursor = DatabaseFactory.getRemappedRecordsDatabase(context).getAllThreads()) {
|
||||
try (Cursor cursor = SignalDatabase.remappedRecords().getAllThreads()) {
|
||||
builder.append(AsciiArt.tableFor(cursor)).append("\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -6,13 +6,7 @@ import android.database.Cursor;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.signal.core.util.AsciiArt;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.whispersystems.libsignal.SignalProtocolAddress;
|
||||
import org.whispersystems.signalservice.api.push.DistributionId;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase;
|
||||
|
||||
/**
|
||||
* Renders data pertaining to sender key. While all private info is obfuscated, this is still only intended to be printed for internal users.
|
||||
@@ -29,12 +23,12 @@ public class LogSectionSenderKey implements LogSection {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
builder.append("--- Sender Keys Created By This Device").append("\n\n");
|
||||
try (Cursor cursor = DatabaseFactory.getSenderKeyDatabase(context).getAllCreatedBySelf()) {
|
||||
try (Cursor cursor = SignalDatabase.senderKeys().getAllCreatedBySelf()) {
|
||||
builder.append(AsciiArt.tableFor(cursor)).append("\n\n");
|
||||
}
|
||||
|
||||
builder.append("--- Sender Key Shared State").append("\n\n");
|
||||
try (Cursor cursor = DatabaseFactory.getSenderKeySharedDatabase(context).getAllSharedWithCursor()) {
|
||||
try (Cursor cursor = SignalDatabase.senderKeyShared().getAllSharedWithCursor()) {
|
||||
builder.append(AsciiArt.tableFor(cursor)).append("\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user