This repository was archived by the owner on Oct 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed
app/src/main/java/app/passwordstore
build-logic/src/main/kotlin/app/passwordstore/gradle Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,14 @@ class LaunchActivity : AppCompatActivity() {
25
25
override fun onCreate (savedInstanceState : Bundle ? ) {
26
26
super .onCreate(savedInstanceState)
27
27
val prefs = sharedPrefs
28
- if (prefs.getBoolean(PreferenceKeys .BIOMETRIC_AUTH , false )) {
28
+ if (prefs.getBoolean(PreferenceKeys .BIOMETRIC_AUTH_2 , false )) {
29
29
BiometricAuthenticator .authenticate(this ) { result ->
30
30
when (result) {
31
31
is Result .Success -> {
32
32
startTargetActivity(false )
33
33
}
34
34
is Result .HardwareUnavailableOrDisabled -> {
35
- prefs.edit { remove(PreferenceKeys .BIOMETRIC_AUTH ) }
35
+ prefs.edit { remove(PreferenceKeys .BIOMETRIC_AUTH_2 ) }
36
36
startTargetActivity(false )
37
37
}
38
38
is Result .Failure ,
Original file line number Diff line number Diff line change @@ -65,14 +65,15 @@ class GeneralSettings(private val activity: FragmentActivity) : SettingsProvider
65
65
defaultValue = false
66
66
}
67
67
68
- val canAuthenticate = BiometricAuthenticator .canAuthenticate(activity)
69
- switch(PreferenceKeys .BIOMETRIC_AUTH ) {
68
+ // val canAuthenticate = BiometricAuthenticator.canAuthenticate(activity)
69
+ switch(PreferenceKeys .BIOMETRIC_AUTH_2 ) {
70
70
titleRes = R .string.pref_biometric_auth_title
71
71
defaultValue = false
72
- enabled = canAuthenticate
73
- summaryRes =
74
- if (canAuthenticate) R .string.pref_biometric_auth_summary
75
- else R .string.pref_biometric_auth_summary_error
72
+ enabled = false
73
+ // summaryRes =
74
+ // if (canAuthenticate) R.string.pref_biometric_auth_summary
75
+ // else R.string.pref_biometric_auth_summary_error
76
+ summary = " Temporarily disabled due to a bug, see issue 2802"
76
77
onClick {
77
78
enabled = false
78
79
val isChecked = checked
@@ -81,15 +82,15 @@ class GeneralSettings(private val activity: FragmentActivity) : SettingsProvider
81
82
when (result) {
82
83
is Result .Success -> {
83
84
// Apply the changes
84
- putBoolean(PreferenceKeys .BIOMETRIC_AUTH , checked)
85
+ putBoolean(PreferenceKeys .BIOMETRIC_AUTH_2 , checked)
85
86
enabled = true
86
87
}
87
88
is Result .Retry -> {}
88
89
else -> {
89
90
// If any error occurs, revert back to the previous
90
91
// state. This
91
92
// catch-all clause includes the cancellation case.
92
- putBoolean(PreferenceKeys .BIOMETRIC_AUTH , ! checked)
93
+ putBoolean(PreferenceKeys .BIOMETRIC_AUTH_2 , ! checked)
93
94
checked = ! isChecked
94
95
enabled = true
95
96
}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ object PreferenceKeys {
10
10
const val APP_THEME = " app_theme"
11
11
const val AUTOFILL_ENABLE = " autofill_enable"
12
12
const val BIOMETRIC_AUTH = " biometric_auth"
13
+ const val BIOMETRIC_AUTH_2 = " biometric_auth_delete_soon_please"
13
14
@Deprecated(
14
15
message = " Use CLEAR_CLIPBOARD_HISTORY instead" ,
15
16
replaceWith = ReplaceWith (" PreferenceKeys.CLEAR_CLIPBOARD_HISTORY" ),
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ object LintConfig {
40
40
disable + = " FragmentFieldInjection"
41
41
// Too pedantic
42
42
disable + = " ArgInFormattedQuantityStringRes"
43
+ // Biometric strings are temporarily unused due to issue 2802
44
+ disable + = " UnusedResources"
43
45
}
44
46
baseline = project.file(" lint-baseline.xml" )
45
47
}
You can’t perform that action at this time.
0 commit comments