Loading packages/CredentialManager/src/com/android/credentialmanager/common/ui/RemoteViewsFactory.kt +51 −55 Original line number Diff line number Diff line Loading @@ -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) Loading Loading
packages/CredentialManager/src/com/android/credentialmanager/common/ui/RemoteViewsFactory.kt +51 −55 Original line number Diff line number Diff line Loading @@ -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) Loading