Fix screen security preference migration

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-10-04 12:37:53 -07:00
parent 10e305d204
commit 5270dad789

View File

@ -23,6 +23,7 @@ import android.content.pm.PackageManager;
import android.database.Cursor; import android.database.Cursor;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.preference.PreferenceManager;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.ProgressBar; import android.widget.ProgressBar;
@ -244,7 +245,8 @@ public class DatabaseUpgradeActivity extends BaseActivity {
} }
if (params[0] < SCREENSHOTS) { 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; return null;