summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Anvesh Renikindi <renikindi@google.com> 2024-06-07 13:47:51 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-06-07 13:47:51 +0000
commitf7fe4268de45d41e69bc430ece75189d1814a773 (patch)
treececdb26572caca94fba896f36f001da49bbf8a74
parent3387119d0fa71ef09031c03b3afa94887ba212ff (diff)
parent16d7941c6d4187c46c5cce7b9ce2ae726304fb50 (diff)
Merge "Use the renamed APIs" into main
-rw-r--r--packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt10
-rw-r--r--packages/CredentialManager/src/com/android/credentialmanager/getflow/GetModel.kt6
2 files changed, 8 insertions, 8 deletions
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt b/packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt
index c477f30a1d2f..08846f0fed96 100644
--- a/packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt
+++ b/packages/CredentialManager/src/com/android/credentialmanager/DataConverter.kt
@@ -45,8 +45,8 @@ import androidx.credentials.CreateCredentialRequest
import androidx.credentials.CreateCustomCredentialRequest
import androidx.credentials.CreatePasswordRequest
import androidx.credentials.CreatePublicKeyCredentialRequest
+import androidx.credentials.CredentialOption
import androidx.credentials.PasswordCredential
-import androidx.credentials.PriorityHints
import androidx.credentials.PublicKeyCredential
import androidx.credentials.provider.CreateEntry
import androidx.credentials.provider.RemoteEntry
@@ -177,9 +177,9 @@ class GetFlowUtils {
"androidx.credentials.BUNDLE_KEY_TYPE_PRIORITY_VALUE",
when (option.type) {
PasswordCredential.TYPE_PASSWORD_CREDENTIAL ->
- PriorityHints.PRIORITY_PASSWORD_OR_SIMILAR
+ CredentialOption.PRIORITY_PASSWORD_OR_SIMILAR
PublicKeyCredential.TYPE_PUBLIC_KEY_CREDENTIAL -> 100
- else -> PriorityHints.PRIORITY_DEFAULT
+ else -> CredentialOption.PRIORITY_DEFAULT
}
)
typePriorityMap[option.type] = priority
@@ -349,8 +349,8 @@ class CreateFlowUtils {
}
is CreateCustomCredentialRequest -> {
// TODO: directly use the display info once made public
- val displayInfo = CreateCredentialRequest.DisplayInfo
- .parseFromCredentialDataBundle(createCredentialRequest.credentialData)
+ val displayInfo = CreateCredentialRequest.DisplayInfo.createFrom(
+ createCredentialRequest.credentialData)
?: return null
RequestDisplayInfo(
title = displayInfo.userId.toString(),
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetModel.kt b/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetModel.kt
index 19f5a99f46fa..314cc0547b89 100644
--- a/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetModel.kt
+++ b/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetModel.kt
@@ -19,7 +19,7 @@ package com.android.credentialmanager.getflow
import android.credentials.flags.Flags.selectorUiImprovementsEnabled
import android.credentials.flags.Flags.credmanBiometricApiEnabled
import android.graphics.drawable.Drawable
-import androidx.credentials.PriorityHints
+import androidx.credentials.CredentialOption
import com.android.credentialmanager.R
import com.android.credentialmanager.model.CredentialType
import com.android.credentialmanager.model.get.ProviderInfo
@@ -322,10 +322,10 @@ internal class CredentialEntryInfoComparatorByTypeThenTimestamp(
// First rank by priorities of each credential type.
if (p0.rawCredentialType != p1.rawCredentialType) {
val p0Priority = typePriorityMap.getOrDefault(
- p0.rawCredentialType, PriorityHints.PRIORITY_DEFAULT
+ p0.rawCredentialType, CredentialOption.PRIORITY_DEFAULT
)
val p1Priority = typePriorityMap.getOrDefault(
- p1.rawCredentialType, PriorityHints.PRIORITY_DEFAULT
+ p1.rawCredentialType, CredentialOption.PRIORITY_DEFAULT
)
if (p0Priority < p1Priority) {
return -1