Support sign-in title variant 'Use your saved password for <app>?'

So far we have variant:
- Use your saved passkey for <app>?
- Use your sign-in for <app>?
- Choose a sign-in for <app>?
This change adds:
- Use your saved password for <app>?

Bug: 280483679
Test: manual (see screenshots in bug)
Change-Id: I7aa953ef6a0ec737e2ec51af4f6e2a8cc7b10c30
This commit is contained in:
Helen Qin
2023-05-03 18:36:24 +00:00
parent 40e35dfad3
commit 3b11f9cefd

View File

@@ -215,10 +215,12 @@ fun PrimarySelectionCard(
HeadlineText(
text = stringResource(
if (hasSingleEntry) {
if (sortedUserNameToCredentialEntryList.firstOrNull()
?.sortedCredentialEntryList?.first()?.credentialType
== CredentialType.PASSKEY
) R.string.get_dialog_title_use_passkey_for
val singleEntryType = sortedUserNameToCredentialEntryList.firstOrNull()
?.sortedCredentialEntryList?.first()?.credentialType
if (singleEntryType == CredentialType.PASSKEY)
R.string.get_dialog_title_use_passkey_for
else if (singleEntryType == CredentialType.PASSWORD)
R.string.get_dialog_title_use_password_for
else R.string.get_dialog_title_use_sign_in_for
} else R.string.get_dialog_title_choose_sign_in_for,
requestDisplayInfo.appName