mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:03:39 +00:00
Add contacts to contact provider on upgrade.
// FREEBIE
This commit is contained in:
parent
410ec57f80
commit
fe552ba53f
@ -34,6 +34,7 @@ import org.thoughtcrime.securesms.crypto.storage.TextSecureSessionStore;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.database.PushDatabase;
|
||||
import org.thoughtcrime.securesms.jobs.CreateSignedPreKeyJob;
|
||||
import org.thoughtcrime.securesms.jobs.DirectoryRefreshJob;
|
||||
import org.thoughtcrime.securesms.jobs.PushDecryptJob;
|
||||
import org.thoughtcrime.securesms.notifications.MessageNotifier;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
@ -54,7 +55,8 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
public static final int SIGNED_PREKEY_VERSION = 83;
|
||||
public static final int NO_DECRYPT_QUEUE_VERSION = 113;
|
||||
public static final int PUSH_DECRYPT_SERIAL_ID_VERSION = 131;
|
||||
public static final int MIGRATE_SESSION_PLAINTEXT = 133;
|
||||
public static final int MIGRATE_SESSION_PLAINTEXT = 135;
|
||||
public static final int CONTACTS_ACCOUNT_VERSION = 135;
|
||||
|
||||
private static final SortedSet<Integer> UPGRADE_VERSIONS = new TreeSet<Integer>() {{
|
||||
add(NO_MORE_KEY_EXCHANGE_PREFIX_VERSION);
|
||||
@ -187,6 +189,12 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
scheduleMessagesInPushDatabase(context);;
|
||||
}
|
||||
|
||||
if (params[0] < CONTACTS_ACCOUNT_VERSION) {
|
||||
ApplicationContext.getInstance(getApplicationContext())
|
||||
.getJobManager()
|
||||
.add(new DirectoryRefreshJob(getApplicationContext()));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user