mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-10 02:38:34 +00:00
Merge branch 'dev' of https://github.com/loki-project/session-android into refactor_clean_0
This commit is contained in:
commit
37cb4cd28c
@ -158,8 +158,8 @@ dependencies {
|
|||||||
testImplementation 'org.robolectric:shadows-multidex:4.2'
|
testImplementation 'org.robolectric:shadows-multidex:4.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
def canonicalVersionCode = 136
|
def canonicalVersionCode = 139
|
||||||
def canonicalVersionName = "1.7.0"
|
def canonicalVersionName = "1.7.1"
|
||||||
|
|
||||||
def postFixSize = 10
|
def postFixSize = 10
|
||||||
def abiPostFix = ['armeabi-v7a' : 1,
|
def abiPostFix = ['armeabi-v7a' : 1,
|
||||||
|
@ -56,12 +56,10 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|||||||
private static final int lokiV18_CLEAR_BG_POLL_JOBS = 39;
|
private static final int lokiV18_CLEAR_BG_POLL_JOBS = 39;
|
||||||
//TODO Merge all "refactor" migrations to one before pushing to the main repo.
|
//TODO Merge all "refactor" migrations to one before pushing to the main repo.
|
||||||
private static final int lokiV19 = 40;
|
private static final int lokiV19 = 40;
|
||||||
private static final int lokiV19_REFACTOR1 = 41;
|
private static final int lokiV20 = 41;
|
||||||
private static final int lokiV19_REFACTOR2 = 42;
|
|
||||||
|
|
||||||
|
|
||||||
// Loki - onUpgrade(...) must be updated to use Loki version numbers if Signal makes any database changes
|
// Loki - onUpgrade(...) must be updated to use Loki version numbers if Signal makes any database changes
|
||||||
private static final int DATABASE_VERSION = lokiV19;
|
private static final int DATABASE_VERSION = lokiV20;
|
||||||
private static final String DATABASE_NAME = "signal.db";
|
private static final String DATABASE_NAME = "signal.db";
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
@ -220,17 +218,12 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Many classes were removed. We need to update DB structure and data to match the code changes.
|
// Many classes were removed. We need to update DB structure and data to match the code changes.
|
||||||
//TODO Merge "refactor" changes in one migration.
|
|
||||||
if (oldVersion < lokiV19) {
|
if (oldVersion < lokiV19) {
|
||||||
db.execSQL(LokiAPIDatabase.getCreateClosedGroupEncryptionKeyPairsTable());
|
db.execSQL(LokiAPIDatabase.getCreateClosedGroupEncryptionKeyPairsTable());
|
||||||
db.execSQL(LokiAPIDatabase.getCreateClosedGroupPublicKeysTable());
|
db.execSQL(LokiAPIDatabase.getCreateClosedGroupPublicKeysTable());
|
||||||
ClosedGroupsMigration.INSTANCE.perform(db);
|
ClosedGroupsMigration.INSTANCE.perform(db);
|
||||||
}
|
|
||||||
if (oldVersion < lokiV19_REFACTOR1) {
|
|
||||||
db.execSQL("DROP TABLE identities");
|
db.execSQL("DROP TABLE identities");
|
||||||
deleteJobRecords(db, "RetrieveProfileJob");
|
deleteJobRecords(db, "RetrieveProfileJob");
|
||||||
}
|
|
||||||
if (oldVersion < lokiV19_REFACTOR2) {
|
|
||||||
deleteJobRecords(db,
|
deleteJobRecords(db,
|
||||||
"RefreshAttributesJob",
|
"RefreshAttributesJob",
|
||||||
"RotateProfileKeyJob",
|
"RotateProfileKeyJob",
|
||||||
@ -239,6 +232,27 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (oldVersion < lokiV20) {
|
||||||
|
deleteJobRecords(db,
|
||||||
|
"CleanPreKeysJob",
|
||||||
|
"RefreshPreKeysJob",
|
||||||
|
"CreateSignedPreKeyJob",
|
||||||
|
"RotateSignedPreKeyJob",
|
||||||
|
"MultiDeviceBlockedUpdateJob",
|
||||||
|
"MultiDeviceConfigurationUpdateJob",
|
||||||
|
"MultiDeviceContactUpdateJob",
|
||||||
|
"MultiDeviceGroupUpdateJob",
|
||||||
|
"MultiDeviceOpenGroupUpdateJob",
|
||||||
|
"MultiDeviceProfileKeyUpdateJob",
|
||||||
|
"MultiDeviceReadUpdateJob",
|
||||||
|
"MultiDeviceStickerPackOperationJob",
|
||||||
|
"MultiDeviceStickerPackSyncJob",
|
||||||
|
"MultiDeviceVerifiedUpdateJob",
|
||||||
|
"ServiceOutageDetectionJob",
|
||||||
|
"SessionRequestMessageSendJob"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
db.setTransactionSuccessful();
|
db.setTransactionSuccessful();
|
||||||
} finally {
|
} finally {
|
||||||
db.endTransaction();
|
db.endTransaction();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user