Skip to content
Snippets Groups Projects
Commit f7fe4268 authored by Anvesh Renikindi's avatar Anvesh Renikindi Committed by Android (Google) Code Review
Browse files

Merge "Use the renamed APIs" into main

parents 3387119d 16d7941c
No related branches found
No related tags found
No related merge requests found
...@@ -45,8 +45,8 @@ import androidx.credentials.CreateCredentialRequest ...@@ -45,8 +45,8 @@ import androidx.credentials.CreateCredentialRequest
import androidx.credentials.CreateCustomCredentialRequest import androidx.credentials.CreateCustomCredentialRequest
import androidx.credentials.CreatePasswordRequest import androidx.credentials.CreatePasswordRequest
import androidx.credentials.CreatePublicKeyCredentialRequest import androidx.credentials.CreatePublicKeyCredentialRequest
import androidx.credentials.CredentialOption
import androidx.credentials.PasswordCredential import androidx.credentials.PasswordCredential
import androidx.credentials.PriorityHints
import androidx.credentials.PublicKeyCredential import androidx.credentials.PublicKeyCredential
import androidx.credentials.provider.CreateEntry import androidx.credentials.provider.CreateEntry
import androidx.credentials.provider.RemoteEntry import androidx.credentials.provider.RemoteEntry
...@@ -177,9 +177,9 @@ class GetFlowUtils { ...@@ -177,9 +177,9 @@ class GetFlowUtils {
"androidx.credentials.BUNDLE_KEY_TYPE_PRIORITY_VALUE", "androidx.credentials.BUNDLE_KEY_TYPE_PRIORITY_VALUE",
when (option.type) { when (option.type) {
PasswordCredential.TYPE_PASSWORD_CREDENTIAL -> PasswordCredential.TYPE_PASSWORD_CREDENTIAL ->
PriorityHints.PRIORITY_PASSWORD_OR_SIMILAR CredentialOption.PRIORITY_PASSWORD_OR_SIMILAR
PublicKeyCredential.TYPE_PUBLIC_KEY_CREDENTIAL -> 100 PublicKeyCredential.TYPE_PUBLIC_KEY_CREDENTIAL -> 100
else -> PriorityHints.PRIORITY_DEFAULT else -> CredentialOption.PRIORITY_DEFAULT
} }
) )
typePriorityMap[option.type] = priority typePriorityMap[option.type] = priority
...@@ -349,8 +349,8 @@ class CreateFlowUtils { ...@@ -349,8 +349,8 @@ class CreateFlowUtils {
} }
is CreateCustomCredentialRequest -> { is CreateCustomCredentialRequest -> {
// TODO: directly use the display info once made public // TODO: directly use the display info once made public
val displayInfo = CreateCredentialRequest.DisplayInfo val displayInfo = CreateCredentialRequest.DisplayInfo.createFrom(
.parseFromCredentialDataBundle(createCredentialRequest.credentialData) createCredentialRequest.credentialData)
?: return null ?: return null
RequestDisplayInfo( RequestDisplayInfo(
title = displayInfo.userId.toString(), title = displayInfo.userId.toString(),
......
...@@ -19,7 +19,7 @@ package com.android.credentialmanager.getflow ...@@ -19,7 +19,7 @@ package com.android.credentialmanager.getflow
import android.credentials.flags.Flags.selectorUiImprovementsEnabled import android.credentials.flags.Flags.selectorUiImprovementsEnabled
import android.credentials.flags.Flags.credmanBiometricApiEnabled import android.credentials.flags.Flags.credmanBiometricApiEnabled
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import androidx.credentials.PriorityHints import androidx.credentials.CredentialOption
import com.android.credentialmanager.R import com.android.credentialmanager.R
import com.android.credentialmanager.model.CredentialType import com.android.credentialmanager.model.CredentialType
import com.android.credentialmanager.model.get.ProviderInfo import com.android.credentialmanager.model.get.ProviderInfo
...@@ -322,10 +322,10 @@ internal class CredentialEntryInfoComparatorByTypeThenTimestamp( ...@@ -322,10 +322,10 @@ internal class CredentialEntryInfoComparatorByTypeThenTimestamp(
// First rank by priorities of each credential type. // First rank by priorities of each credential type.
if (p0.rawCredentialType != p1.rawCredentialType) { if (p0.rawCredentialType != p1.rawCredentialType) {
val p0Priority = typePriorityMap.getOrDefault( val p0Priority = typePriorityMap.getOrDefault(
p0.rawCredentialType, PriorityHints.PRIORITY_DEFAULT p0.rawCredentialType, CredentialOption.PRIORITY_DEFAULT
) )
val p1Priority = typePriorityMap.getOrDefault( val p1Priority = typePriorityMap.getOrDefault(
p1.rawCredentialType, PriorityHints.PRIORITY_DEFAULT p1.rawCredentialType, CredentialOption.PRIORITY_DEFAULT
) )
if (p0Priority < p1Priority) { if (p0Priority < p1Priority) {
return -1 return -1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment