Fix debug screen security default (#1256)

This commit is contained in:
Andrew 2023-06-30 10:05:32 +09:30 committed by GitHub
parent b9f24bc4bd
commit c039eb89bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 2 deletions

View File

@ -14,7 +14,7 @@
<!-- TODO: check figure out what is needed for this -->
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:defaultValue="true"
android:defaultValue="@bool/screen_security_default"
android:key="pref_screen_security"
android:title="@string/preferences__screen_security"
android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" />

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="screen_security_default">false</bool>
</resources>

View File

@ -649,7 +649,7 @@ interface TextSecurePreferences {
@JvmStatic
fun isScreenSecurityEnabled(context: Context): Boolean {
return getBooleanPreference(context, SCREEN_SECURITY_PREF, !BuildConfig.DEBUG)
return getBooleanPreference(context, SCREEN_SECURITY_PREF, context.resources.getBoolean(R.bool.screen_security_default))
}
fun getLastVersionCode(context: Context): Int {

View File

@ -2,4 +2,5 @@
<resources>
<bool name="enable_alarm_manager">true</bool>
<bool name="enable_job_service">false</bool>
<bool name="screen_security_default">true</bool>
</resources>