From 5270dad78966f67c51d9aaa2a6747cf4f0259eba Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Wed, 4 Oct 2017 12:37:53 -0700 Subject: [PATCH] Fix screen security preference migration // FREEBIE --- src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java b/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java index eea9536db8..bb4436c5ed 100644 --- a/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java +++ b/src/org/thoughtcrime/securesms/DatabaseUpgradeActivity.java @@ -23,6 +23,7 @@ import android.content.pm.PackageManager; import android.database.Cursor; import android.os.AsyncTask; import android.os.Bundle; +import android.support.v7.preference.PreferenceManager; import android.util.Log; import android.view.View; import android.widget.ProgressBar; @@ -244,7 +245,8 @@ public class DatabaseUpgradeActivity extends BaseActivity { } if (params[0] < SCREENSHOTS) { - TextSecurePreferences.setScreenSecurityEnabled(getApplicationContext(), true); + boolean screenSecurity = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(TextSecurePreferences.SCREEN_SECURITY_PREF, true); + TextSecurePreferences.setScreenSecurityEnabled(getApplicationContext(), screenSecurity); } return null;