Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 562ad785 authored by Helen Qin's avatar Helen Qin
Browse files

Update the sign-in title variants.

For the latest decision see
https://b.corp.google.com/issues/280483679#comment6.

Test: manual (see bug for screenshots)
Bug: 280483679
Change-Id: I76259f307e70cfb9ef7db99dcd6b3c1626bc8ff2
parent 22cc6b63
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -217,13 +217,27 @@ fun PrimarySelectionCard(
                    text = stringResource(
                        if (hasSingleEntry) {
                            val singleEntryType = sortedUserNameToCredentialEntryList.firstOrNull()
                                ?.sortedCredentialEntryList?.first()?.credentialType
                                ?.sortedCredentialEntryList?.firstOrNull()?.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 if (authenticationEntryList.isNotEmpty())
                                R.string.get_dialog_title_unlock_options_for
                            else R.string.get_dialog_title_use_sign_in_for
                        } else R.string.get_dialog_title_choose_sign_in_for,
                        } else {
                            if (authenticationEntryList.isNotEmpty() ||
                                sortedUserNameToCredentialEntryList.any { perNameEntryList ->
                                    perNameEntryList.sortedCredentialEntryList.any { entry ->
                                        entry.credentialType != CredentialType.PASSWORD &&
                                            entry.credentialType != CredentialType.PASSKEY
                                    }
                                }
                            )
                                R.string.get_dialog_title_choose_sign_in_for
                            else
                                R.string.get_dialog_title_choose_saved_sign_in_for
                        },
                        requestDisplayInfo.appName
                    ),
                )