Implement resumable downloads.

This commit is contained in:
Greyson Parrelli
2019-12-28 10:08:11 -05:00
committed by Alan Evans
parent 7e72c9c33b
commit 4e7b4da941
9 changed files with 92 additions and 57 deletions

View File

@@ -98,8 +98,9 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
private static final int REACTIONS = 37;
private static final int STORAGE_SERVICE = 38;
private static final int REACTIONS_UNREAD_INDEX = 39;
private static final int RESUMABLE_DOWNLOADS = 40;
private static final int DATABASE_VERSION = 39;
private static final int DATABASE_VERSION = 40;
private static final String DATABASE_NAME = "signal.db";
private final Context context;
@@ -679,6 +680,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
db.execSQL("CREATE INDEX IF NOT EXISTS mms_reactions_unread_index ON mms (reactions_unread);");
}
if (oldVersion < RESUMABLE_DOWNLOADS) {
db.execSQL("ALTER TABLE part ADD COLUMN transfer_file TEXT DEFAULT NULL");
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();