Support for sealed sender - Part 1

This commit is contained in:
Moxie Marlinspike
2018-05-22 02:13:10 -07:00
committed by Greyson Parrelli
parent b7b9554364
commit 5f31762220
67 changed files with 1679 additions and 801 deletions

View File

@@ -56,8 +56,9 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
private static final int BAD_IMPORT_CLEANUP = 10;
private static final int QUOTE_MISSING = 11;
private static final int NOTIFICATION_CHANNELS = 12;
private static final int SECRET_SENDER = 13;
private static final int DATABASE_VERSION = 12;
private static final int DATABASE_VERSION = 13;
private static final String DATABASE_NAME = "signal.db";
private final Context context;
@@ -284,6 +285,12 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
}
}
if (oldVersion < SECRET_SENDER) {
db.execSQL("ALTER TABLE recipient_preferences ADD COLUMN unidentified_access_mode INTEGER DEFAULT 0");
db.execSQL("ALTER TABLE push ADD COLUMN server_timestamp INTEGER DEFAULT 0");
db.execSQL("ALTER TABLE push ADD COLUMN server_guid TEXT DEFAULT NULL");
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();