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

Commit c2d3b63a authored by Reema Bajwa's avatar Reema Bajwa Committed by Android (Google) Code Review
Browse files

Merge "Make UI pending intent unique, and make credential entry icon optional...

Merge "Make UI pending intent unique, and make credential entry icon optional Test: Built & deployed locally Bug: 253155431"
parents bbf52397 9c0ca722
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ class GetFlowUtils {
          userName = credentialEntryUi.userName.toString(),
          displayName = credentialEntryUi.userDisplayName?.toString(),
          // TODO: proper fallback
          icon = credentialEntryUi.entryIcon.loadDrawable(context)
          icon = credentialEntryUi.entryIcon?.loadDrawable(context)
            ?: context.getDrawable(R.drawable.ic_passkey)!!,
          lastUsedTimeMillis = credentialEntryUi.lastUsedTimeMillis,
        )
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ class CredentialEntryUi(
  val credentialTypeDisplayName: CharSequence,
  val userName: CharSequence,
  val userDisplayName: CharSequence?,
  val entryIcon: Icon,
  val entryIcon: Icon?,
  val lastUsedTimeMillis: Long?,
  val note: CharSequence?,
) {
@@ -62,7 +62,7 @@ class CredentialEntryUi(
      }

      return CredentialEntryUi(
        credentialType, credentialTypeDisplayName!!, userName!!, userDisplayName, entryIcon!!,
        credentialType, credentialTypeDisplayName!!, userName!!, userDisplayName, entryIcon,
        lastUsedTimeMillis, note,
      )
    }
+3 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.util.Log;
import android.util.Slog;

import java.util.ArrayList;
import java.util.UUID;

/** Initiates the Credential Manager UI and receives results. */
public class CredentialManagerUi {
@@ -89,7 +90,8 @@ public class CredentialManagerUi {
            RequestInfo requestInfo, ArrayList<ProviderData> providerDataList) {
        Log.i(TAG, "In createPendingIntent");
        Intent intent = IntentFactory.newIntent(requestInfo, providerDataList, new ArrayList<>(),
                mResultReceiver).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                mResultReceiver)
                .setAction(UUID.randomUUID().toString());
        //TODO: Determine if a specific request code is needed
        return PendingIntent.getActivity(
                mContext, /*requestCode=*/0, intent, PendingIntent.FLAG_IMMUTABLE);