diff options
author | Harsh Shandilya <msfjarvis@gmail.com> | 2019-11-03 18:05:07 +0530 |
---|---|---|
committer | Harsh Shandilya <msfjarvis@gmail.com> | 2019-11-03 18:05:07 +0530 |
commit | 8c00708d9fe653adc96a014ebd5752ae8b5da231 (patch) | |
tree | 6ba4f3f609510f14fc26ff497bb5749610cac39a /app | |
parent | 2be6302b6bc3355ffb7b7a6a0bd3c9de624d69ab (diff) |
Use SwitchPreferenceCompat
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/UserPreference.kt | 4 | ||||
-rw-r--r-- | app/src/main/res/xml/preference.xml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt index db303efc..d770c2aa 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt @@ -27,7 +27,7 @@ import androidx.preference.CheckBoxPreference import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat import androidx.preference.PreferenceManager -import androidx.preference.SwitchPreference +import androidx.preference.SwitchPreferenceCompat import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.zeapo.pwdstore.autofill.AutofillPreferenceActivity import com.zeapo.pwdstore.crypto.PgpActivity @@ -267,7 +267,7 @@ class UserPreference : AppCompatActivity() { } } - findPreference<SwitchPreference>("biometric_auth")?.apply { + findPreference<SwitchPreferenceCompat>("biometric_auth")?.apply { val isFingerprintSupported = BiometricManager.from(requireContext()).canAuthenticate() == BiometricManager.BIOMETRIC_SUCCESS if (!isFingerprintSupported) { isEnabled = false diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml index b6d720a5..25026517 100644 --- a/app/src/main/res/xml/preference.xml +++ b/app/src/main/res/xml/preference.xml @@ -91,7 +91,7 @@ android:entries="@array/sort_order_entries" android:entryValues="@array/sort_order_values" android:persistent="true" /> - <androidx.preference.SwitchPreference + <androidx.preference.SwitchPreferenceCompat android:key="biometric_auth" android:title="@string/biometric_auth_title" android:summary="@string/biometric_auth_summary" /> |