Decrypt and process messages all in one transaction.

Giddy up
This commit is contained in:
Greyson Parrelli
2021-02-23 18:34:18 -05:00
committed by GitHub
parent d651716d99
commit 8950100bd7
21 changed files with 2523 additions and 2008 deletions

View File

@@ -107,6 +107,12 @@ public class DatabaseFactory {
return getInstance(context).draftDatabase;
}
/**
* @deprecated You probably shouldn't be using this anymore. It used to store encrypted envelopes,
* but now it's skipped over in favor of other mechanisms. It's only accessible to
* support old migrations and stuff.
*/
@Deprecated
public static PushDatabase getPushDatabase(Context context) {
return getInstance(context).pushDatabase;
}

View File

@@ -16,6 +16,7 @@ import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope;
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
import org.whispersystems.signalservice.internal.util.Util;
import java.io.Closeable;
import java.io.IOException;
public class PushDatabase extends Database {
@@ -149,7 +150,7 @@ public class PushDatabase extends Database {
}
}
public static class Reader {
public static class Reader implements Closeable {
private final Cursor cursor;
public Reader(Cursor cursor) {
@@ -186,6 +187,7 @@ public class PushDatabase extends Database {
}
}
@Override
public void close() {
this.cursor.close();
}