mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Properly clear unknown ids from storage service.
This commit is contained in:
committed by
Cody Henthorne
parent
cb126a2f08
commit
0fe9df3023
@@ -82,6 +82,19 @@ public class UnknownStorageIdTable extends DatabaseTable {
|
||||
return ids;
|
||||
}
|
||||
|
||||
public void deleteAllWithTypes(List<Integer> types) {
|
||||
SQLiteDatabase db = getWritableDatabase();
|
||||
db.beginTransaction();
|
||||
try {
|
||||
for (int type : types) {
|
||||
db.delete(TABLE_NAME, TYPE + " = ?", SqlUtil.buildArgs(type));
|
||||
}
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
public @Nullable SignalStorageRecord getById(@NonNull byte[] rawId) {
|
||||
String query = STORAGE_ID + " = ?";
|
||||
String[] args = new String[] { Base64.encodeWithPadding(rawId) };
|
||||
|
||||
Reference in New Issue
Block a user