Allow linking of devices if no passlock is set.

This commit is contained in:
mtang-signal
2024-09-04 12:12:33 -07:00
committed by Cody Henthorne
parent 93c8cd133d
commit ba2d5bce41
3 changed files with 6 additions and 5 deletions

View File

@@ -118,12 +118,12 @@ class ScreenLockSettingsFragment : ComposeFragment() {
ScreenLockScreen(
state = state,
onChecked = { checked ->
if (biometricAuth.canAuthenticate() && !checked) {
if (biometricAuth.canAuthenticate(requireContext()) && !checked) {
biometricAuth.updatePromptInfo(disableLockPromptInfo)
biometricAuth.authenticate(requireContext(), true) {
biometricDeviceLockLauncher.launch(getString(R.string.ScreenLockSettingsFragment__turn_off_signal_lock))
}
} else if (biometricAuth.canAuthenticate() && checked) {
} else if (biometricAuth.canAuthenticate(requireContext()) && checked) {
biometricAuth.updatePromptInfo(enableLockPromptInfo)
biometricAuth.authenticate(requireContext(), true) {
biometricDeviceLockLauncher.launch(getString(R.string.ScreenLockSettingsFragment__use_screen_lock))