mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Delete old message DB
This commit is contained in:
parent
0753ff85ed
commit
3bceb0d8ec
@ -76,6 +76,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
public static final int PERSISTENT_BLOBS = 317;
|
||||
public static final int INTERNALIZE_CONTACTS = 317;
|
||||
public static final int SQLCIPHER = 334;
|
||||
public static final int SQLCIPHER_COMPLETE = 352;
|
||||
|
||||
private static final SortedSet<Integer> UPGRADE_VERSIONS = new TreeSet<Integer>() {{
|
||||
add(NO_MORE_KEY_EXCHANGE_PREFIX_VERSION);
|
||||
@ -94,6 +95,7 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
add(INTERNALIZE_CONTACTS);
|
||||
add(PERSISTENT_BLOBS);
|
||||
add(SQLCIPHER);
|
||||
add(SQLCIPHER_COMPLETE);
|
||||
}};
|
||||
|
||||
private MasterSecret masterSecret;
|
||||
@ -277,6 +279,11 @@ public class DatabaseUpgradeActivity extends BaseActivity {
|
||||
scheduleMessagesInPushDatabase(context);
|
||||
}
|
||||
|
||||
if (params[0] < SQLCIPHER_COMPLETE) {
|
||||
File file = context.getDatabasePath("messages.db");
|
||||
if (file != null && file.exists()) file.delete();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user