mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
SES-2810 - Removing the screenshot privacy toggle
This commit is contained in:
parent
f6d50ac858
commit
fea66ece2e
@ -126,12 +126,8 @@ public abstract class BaseActionBarActivity extends AppCompatActivity {
|
||||
private void initializeScreenshotSecurity(boolean isResume) {
|
||||
if (!isResume) {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
} else {
|
||||
if (TextSecurePreferences.isScreenSecurityEnabled(this)) {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
} else {
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,12 +11,6 @@
|
||||
android:title="@string/lockApp"
|
||||
android:summary="@string/lockAppDescription" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="@bool/screen_security_default"
|
||||
android:key="pref_screen_security"
|
||||
android:title="@string/screenshotNotifications"
|
||||
android:summary="@string/screenshotNotificationsDescription" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
|
@ -115,7 +115,6 @@ interface TextSecurePreferences {
|
||||
fun isEnterSendsEnabled(): Boolean
|
||||
fun isPasswordDisabled(): Boolean
|
||||
fun setPasswordDisabled(disabled: Boolean)
|
||||
fun isScreenSecurityEnabled(): Boolean
|
||||
fun getLastVersionCode(): Int
|
||||
fun setLastVersionCode(versionCode: Int)
|
||||
fun isPassphraseTimeoutEnabled(): Boolean
|
||||
@ -216,7 +215,6 @@ interface TextSecurePreferences {
|
||||
const val LED_BLINK_PREF_CUSTOM = "pref_led_blink_custom"
|
||||
const val PASSPHRASE_TIMEOUT_INTERVAL_PREF = "pref_timeout_interval"
|
||||
const val PASSPHRASE_TIMEOUT_PREF = "pref_timeout_passphrase"
|
||||
const val SCREEN_SECURITY_PREF = "pref_screen_security"
|
||||
const val ENTER_SENDS_PREF = "pref_enter_sends"
|
||||
const val THREAD_TRIM_ENABLED = "pref_trim_threads"
|
||||
const val LOCAL_NUMBER_PREF = "pref_local_number"
|
||||
@ -687,11 +685,6 @@ interface TextSecurePreferences {
|
||||
setBooleanPreference(context, DISABLE_PASSPHRASE_PREF, disabled)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isScreenSecurityEnabled(context: Context): Boolean {
|
||||
return getBooleanPreference(context, SCREEN_SECURITY_PREF, context.resources.getBoolean(R.bool.screen_security_default))
|
||||
}
|
||||
|
||||
fun getLastVersionCode(context: Context): Int {
|
||||
return getIntegerPreference(context, LAST_VERSION_CODE_PREF, 0)
|
||||
}
|
||||
@ -1329,10 +1322,6 @@ class AppTextSecurePreferences @Inject constructor(
|
||||
setBooleanPreference(TextSecurePreferences.DISABLE_PASSPHRASE_PREF, disabled)
|
||||
}
|
||||
|
||||
override fun isScreenSecurityEnabled(): Boolean {
|
||||
return getBooleanPreference(TextSecurePreferences.SCREEN_SECURITY_PREF, true)
|
||||
}
|
||||
|
||||
override fun getLastVersionCode(): Int {
|
||||
return getIntegerPreference(TextSecurePreferences.LAST_VERSION_CODE_PREF, 0)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user