From d9aefd1ce21ab20215d8ad6df0097d7094a59412 Mon Sep 17 00:00:00 2001 From: ekager Date: Thu, 1 Oct 2020 14:13:46 -0700 Subject: [PATCH] [fenix] No issue: Update biometric, core, and recyclerview libraries --- .../settings/logins/fragment/SavedLoginsAuthFragment.kt | 6 ++++-- buildSrc/src/main/java/Dependencies.kt | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/settings/logins/fragment/SavedLoginsAuthFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/logins/fragment/SavedLoginsAuthFragment.kt index 4246beccdd..9a2d70b6b1 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/logins/fragment/SavedLoginsAuthFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/logins/fragment/SavedLoginsAuthFragment.kt @@ -16,6 +16,8 @@ import android.provider.Settings.ACTION_SECURITY_SETTINGS import android.util.Log import androidx.appcompat.app.AlertDialog import androidx.biometric.BiometricManager +import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_WEAK +import androidx.biometric.BiometricManager.Authenticators.DEVICE_CREDENTIAL import androidx.biometric.BiometricPrompt import androidx.core.content.ContextCompat import androidx.core.content.getSystemService @@ -98,7 +100,7 @@ class SavedLoginsAuthFragment : PreferenceFragmentCompat() { promptInfo = BiometricPrompt.PromptInfo.Builder() .setTitle(getString(R.string.logins_biometric_prompt_message)) - .setDeviceCredentialAllowed(true) + .setAllowedAuthenticators(BIOMETRIC_WEAK or DEVICE_CREDENTIAL) .build() } @@ -154,7 +156,7 @@ class SavedLoginsAuthFragment : PreferenceFragmentCompat() { private fun canUseBiometricPrompt(context: Context): Boolean { return if (SDK_INT >= M) { val manager = BiometricManager.from(context) - val canAuthenticate = manager.canAuthenticate() + val canAuthenticate = manager.canAuthenticate(BIOMETRIC_WEAK) val hardwareUnavailable = canAuthenticate == BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE || canAuthenticate == BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 6daeba32ef..175af04e95 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -13,7 +13,7 @@ object Versions { const val detekt = "1.9.1" const val androidx_appcompat = "1.2.0-rc01" - const val androidx_biometric = "1.1.0-alpha01" + const val androidx_biometric = "1.1.0-beta01" const val androidx_coordinator_layout = "1.1.0-rc01" const val androidx_constraint_layout = "2.0.0" const val androidx_preference = "1.1.0" @@ -22,8 +22,8 @@ object Versions { const val androidx_lifecycle = "2.2.0" const val androidx_fragment = "1.2.5" const val androidx_navigation = "2.3.0" - const val androidx_recyclerview = "1.2.0-alpha05" - const val androidx_core = "1.2.0" + const val androidx_recyclerview = "1.2.0-alpha06" + const val androidx_core = "1.3.2" const val androidx_paging = "2.1.0" const val androidx_transition = "1.3.0" const val androidx_work = "2.2.0"