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

Commit 32d320bd authored by Joy Babafemi's avatar Joy Babafemi Committed by Android (Google) Code Review
Browse files

Merge "Credman- Update dropdown presentation logic according to UX updates" into main

parents 5e199391 3d8aa4d6
Loading
Loading
Loading
Loading
+51 −55
Original line number Diff line number Diff line
@@ -45,21 +45,17 @@ class RemoteViewsFactory {
                return remoteViews
            }
            setRemoteViewsPaddings(remoteViews, context, /* primaryTextBottomPadding=*/0)
            if (credentialEntryInfo.credentialType == CredentialType.PASSKEY) {
            val displayName = credentialEntryInfo.displayName ?: credentialEntryInfo.userName
            remoteViews.setTextViewText(android.R.id.text1, displayName)
                val secondaryText = if (credentialEntryInfo.displayName != null)
            val secondaryText =
                if (credentialEntryInfo.displayName != null
                    && (credentialEntryInfo.displayName != credentialEntryInfo.userName))
                    (credentialEntryInfo.userName + " " + bulletPoint + " "
                            + credentialEntryInfo.credentialTypeDisplayName
                            + " " + bulletPoint + " " + credentialEntryInfo.providerDisplayName)
                else (credentialEntryInfo.credentialTypeDisplayName + " " + bulletPoint + " "
                        + credentialEntryInfo.providerDisplayName)
            remoteViews.setTextViewText(android.R.id.text2, secondaryText)
            } else {
                remoteViews.setTextViewText(android.R.id.text1, credentialEntryInfo.userName)
                remoteViews.setTextViewText(android.R.id.text2,
                        bulletPoint.repeat(passwordCharacterLength))
            }
            val textColorPrimary = ContextCompat.getColor(context,
                com.android.credentialmanager.R.color.text_primary)
            remoteViews.setTextColor(android.R.id.text1, textColorPrimary)