From 6ad00dab9b2662a80213834bdae1ae86bdad86d0 Mon Sep 17 00:00:00 2001 From: Harris Date: Mon, 30 May 2022 14:45:25 +1000 Subject: [PATCH] feat: disable screen security default if we are building a debug build for UI testing purposes (#894) --- .../org/session/libsession/utilities/TextSecurePreferences.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt b/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt index 71b766daa4..c52583df4a 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt @@ -11,6 +11,7 @@ import dagger.hilt.android.qualifiers.ApplicationContext import kotlinx.coroutines.channels.BufferOverflow import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.asSharedFlow +import org.session.libsession.BuildConfig import org.session.libsession.R import org.session.libsession.utilities.TextSecurePreferences.Companion.CALL_NOTIFICATIONS_ENABLED import org.session.libsession.utilities.TextSecurePreferences.Companion.SHOWN_CALL_NOTIFICATION @@ -608,7 +609,7 @@ interface TextSecurePreferences { @JvmStatic fun isScreenSecurityEnabled(context: Context): Boolean { - return getBooleanPreference(context, SCREEN_SECURITY_PREF, true) + return getBooleanPreference(context, SCREEN_SECURITY_PREF, !BuildConfig.DEBUG) } fun getLastVersionCode(context: Context): Int {