BIT-2247: Persists screen recording flag past a logout (#1280)

This commit is contained in:
David Perez
2024-04-17 11:39:30 -05:00
committed by Álison Fernandes
parent da277ed32a
commit e58710b3e8
4 changed files with 9 additions and 6 deletions

View File

@@ -148,9 +148,12 @@ class SettingsDiskSourceImpl(
isApprovePasswordlessLoginsEnabled = null,
)
storeLastSyncTime(userId = userId, lastSyncTime = null)
storeScreenCaptureAllowed(userId = userId, isScreenCaptureAllowed = null)
storeClearClipboardFrequencySeconds(userId = userId, frequency = null)
removeWithPrefix(prefix = "${ACCOUNT_BIOMETRIC_INTEGRITY_VALID_KEY}_$userId")
// The following are intentionally not cleared so they can be
// restored after logging out and back in:
// - screen capture allowed
}
override fun getAccountBiometricIntegrityValidity(

View File

@@ -262,9 +262,9 @@ class SettingsRepositoryImpl(
autofillEnabledManager.isAutofillEnabledStateFlow
override var isScreenCaptureAllowed: Boolean
get() = activeUserId?.let {
settingsDiskSource.getScreenCaptureAllowed(it)
} ?: DEFAULT_IS_SCREEN_CAPTURE_ALLOWED
get() = activeUserId
?.let { settingsDiskSource.getScreenCaptureAllowed(it) }
?: DEFAULT_IS_SCREEN_CAPTURE_ALLOWED
set(value) {
val userId = activeUserId ?: return
settingsDiskSource.storeScreenCaptureAllowed(