|
6 | 6 | * @author David González Verdugo |
7 | 7 | * @author Abel García de Prada |
8 | 8 | * @author Juan Carlos Garrote Gascón |
9 | | - * Copyright (C) 2021 ownCloud GmbH. |
| 9 | + * @author Jorge Aguado Recio |
| 10 | + * |
| 11 | + * Copyright (C) 2025 ownCloud GmbH. |
10 | 12 | * <p> |
11 | 13 | * This program is free software: you can redistribute it and/or modify |
12 | 14 | * it under the terms of the GNU General Public License version 2, |
@@ -40,6 +42,7 @@ import com.owncloud.android.R |
40 | 42 | import com.owncloud.android.data.providers.implementation.OCSharedPreferencesProvider |
41 | 43 | import com.owncloud.android.databinding.ActivityPatternLockBinding |
42 | 44 | import com.owncloud.android.extensions.showBiometricDialog |
| 45 | +import com.owncloud.android.extensions.showMessageInSnackbar |
43 | 46 | import com.owncloud.android.presentation.documentsprovider.DocumentsProviderUtils.notifyDocumentsProviderRoots |
44 | 47 | import com.owncloud.android.presentation.security.PREFERENCE_LAST_UNLOCK_TIMESTAMP |
45 | 48 | import com.owncloud.android.presentation.security.biometric.BiometricStatus |
@@ -76,6 +79,10 @@ class PatternActivity : AppCompatActivity(), EnableBiometrics { |
76 | 79 |
|
77 | 80 | setContentView(binding.root) |
78 | 81 |
|
| 82 | + if (intent.getBooleanExtra(BIOMETRIC_HAS_FAILED, false)) { |
| 83 | + showMessageInSnackbar(message = getString(R.string.biometric_not_available)) |
| 84 | + } |
| 85 | + |
79 | 86 | binding.patternLockView.clearPattern() |
80 | 87 |
|
81 | 88 | // Allow or disallow touches with other visible windows |
@@ -354,5 +361,6 @@ class PatternActivity : AppCompatActivity(), EnableBiometrics { |
354 | 361 | private const val KEY_PATTERN_STRING = "PATTERN_STRING" |
355 | 362 | private const val PATTERN_HEADER_VIEW_TEXT = "PATTERN_HEADER_VIEW_TEXT" |
356 | 363 | private const val PATTERN_EXP_VIEW_STATE = "PATTERN_EXP_VIEW_STATE" |
| 364 | + private const val BIOMETRIC_HAS_FAILED = "BIOMETRIC_HAS_FAILED" |
357 | 365 | } |
358 | 366 | } |
0 commit comments