mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Decrypt and process messages all in one transaction.
Giddy up
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user