From c5bf84cf9cea051f644c8e21285e482a304bacbb Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 14 Nov 2016 13:36:48 -0800 Subject: [PATCH] Make blocking SN changes the default for now // FREEBIE --- res/xml/preferences_app_protection.xml | 2 +- .../securesms/DatabaseUpgradeActivity.java | 10 +++++----- .../securesms/util/TextSecurePreferences.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/res/xml/preferences_app_protection.xml b/res/xml/preferences_app_protection.xml index 0cdee84f75..91a3928471 100644 --- a/res/xml/preferences_app_protection.xml +++ b/res/xml/preferences_app_protection.xml @@ -29,7 +29,7 @@ android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" /> diff --git a/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java b/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java index ea84cd2260..f424f2f10c 100644 --- a/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java +++ b/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java @@ -69,7 +69,7 @@ public class DatabaseUpgradeActivity extends BaseActivity { public static final int CONTACTS_ACCOUNT_VERSION = 136; public static final int MEDIA_DOWNLOAD_CONTROLS_VERSION = 151; public static final int REDPHONE_SUPPORT_VERSION = 157; - public static final int FINGERPRINTS_NON_BLOCKING_VESRION = 212; +// public static final int FINGERPRINTS_NON_BLOCKING_VESRION = 212; private static final SortedSet UPGRADE_VERSIONS = new TreeSet() {{ add(NO_MORE_KEY_EXCHANGE_PREFIX_VERSION); @@ -83,7 +83,7 @@ public class DatabaseUpgradeActivity extends BaseActivity { add(MIGRATE_SESSION_PLAINTEXT); add(MEDIA_DOWNLOAD_CONTROLS_VERSION); add(REDPHONE_SUPPORT_VERSION); - add(FINGERPRINTS_NON_BLOCKING_VESRION); +// add(FINGERPRINTS_NON_BLOCKING_VESRION); }}; private MasterSecret masterSecret; @@ -234,9 +234,9 @@ public class DatabaseUpgradeActivity extends BaseActivity { .add(new DirectoryRefreshJob(getApplicationContext())); } - if (params[0] < FINGERPRINTS_NON_BLOCKING_VESRION) { - TextSecurePreferences.setBlockingIdentityUpdates(getApplicationContext(), true); - } +// if (params[0] < FINGERPRINTS_NON_BLOCKING_VESRION) { +// TextSecurePreferences.setBlockingIdentityUpdates(getApplicationContext(), true); +// } return null; } diff --git a/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java b/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java index bdfc8f20ea..2d985a2d35 100644 --- a/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java +++ b/src/org/thoughtcrime/securesms/util/TextSecurePreferences.java @@ -115,7 +115,7 @@ public class TextSecurePreferences { } public static boolean isBlockingIdentityUpdates(Context context) { - return getBooleanPreference(context, BLOCKING_IDENTITY_CHANGES_PREF, false); + return getBooleanPreference(context, BLOCKING_IDENTITY_CHANGES_PREF, true); } public static void setBlockingIdentityUpdates(Context context, boolean value) {