Add option to disable screen security

See WhisperSystems/TextSecure#788
This commit is contained in:
Sam Whited
2014-02-26 16:15:45 -05:00
parent 5a62856e46
commit 384fb3b2b5
4 changed files with 60 additions and 57 deletions

View File

@@ -29,6 +29,7 @@ public class TextSecurePreferences {
private static final String PASSPHRASE_TIMEOUT_INTERVAL_PREF = "pref_timeout_interval";
private static final String PASSPHRASE_TIMEOUT_PREF = "pref_timeout_passphrase";
private static final String AUTO_KEY_EXCHANGE_PREF = "pref_auto_complete_key_exchange";
private static final String SCREEN_SECURITY_PREF = "pref_screen_security";
private static final String ENTER_SENDS_PREF = "pref_enter_sends";
private static final String ENTER_PRESENT_PREF = "pref_enter_key";
private static final String SMS_DELIVERY_REPORT_PREF = "pref_delivery_report_sms";
@@ -134,6 +135,10 @@ public class TextSecurePreferences {
return getBooleanPreference(context, AUTO_KEY_EXCHANGE_PREF, true);
}
public static boolean isScreenSecurityEnabled(Context context) {
return getBooleanPreference(context, SCREEN_SECURITY_PREF, true);
}
public static boolean isUseLocalApnsEnabled(Context context) {
return getBooleanPreference(context, ENABLE_MANUAL_MMS_PREF, false);
}