From ca471b1408b1a7a0640e5f7d040fce072b180f9e Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Thu, 5 Apr 2018 03:50:33 -0700 Subject: [PATCH] Explicitly remove messages.db journal Fixes #7636 --- src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java b/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java index dac892c6e2..bee3fd17c3 100644 --- a/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java +++ b/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java @@ -77,6 +77,7 @@ public class DatabaseUpgradeActivity extends BaseActivity { public static final int INTERNALIZE_CONTACTS = 317; public static final int SQLCIPHER = 334; public static final int SQLCIPHER_COMPLETE = 352; + public static final int REMOVE_JOURNAL = 353; private static final SortedSet UPGRADE_VERSIONS = new TreeSet() {{ add(NO_MORE_KEY_EXCHANGE_PREFIX_VERSION); @@ -284,6 +285,11 @@ public class DatabaseUpgradeActivity extends BaseActivity { if (file != null && file.exists()) file.delete(); } + if (params[0] < REMOVE_JOURNAL) { + File file = context.getDatabasePath("messages.db-journal"); + if (file != null && file.exists()) file.delete(); + } + return null; }