diff options
author | Reema Bajwa <reemabajwa@google.com> | 2023-10-06 21:38:53 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-11-09 21:20:27 +0000 |
commit | ca998661cae14ed4ddc7b475846dac1397cb152a (patch) | |
tree | c1927dc8d782a6434fa57143132f9337df6aa9a2 | |
parent | 0dbbe6b1c2251285ce04372a1094960adcd4aa6e (diff) | |
download | base-ca998661cae14ed4ddc7b475846dac1397cb152a.tar.gz |
Create pending intent for specific user
Test: Built locally & deployed to device
Bug: 303835719
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a75c8e7b68f9d3ff0eac572190fe2894a768345c)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b9c5b0f408250faa2d8dadd7d2ba8beeb88ea463)
Merged-In: If03e146a069b9162d41eee26b7070ea52827fddf
Change-Id: If03e146a069b9162d41eee26b7070ea52827fddf
-rw-r--r-- | services/credentials/java/com/android/server/credentials/CredentialManagerUi.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/services/credentials/java/com/android/server/credentials/CredentialManagerUi.java b/services/credentials/java/com/android/server/credentials/CredentialManagerUi.java index 272452e1b2ae..6589503c9748 100644 --- a/services/credentials/java/com/android/server/credentials/CredentialManagerUi.java +++ b/services/credentials/java/com/android/server/credentials/CredentialManagerUi.java @@ -32,6 +32,7 @@ import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.ResultReceiver; +import android.os.UserHandle; import android.service.credentials.CredentialProviderInfoFactory; import android.util.Slog; @@ -171,7 +172,9 @@ public class CredentialManagerUi { .setAction(UUID.randomUUID().toString()); //TODO: Create unique pending intent using request code and cancel any pre-existing pending // intents - return PendingIntent.getActivity( - mContext, /*requestCode=*/0, intent, PendingIntent.FLAG_IMMUTABLE); + return PendingIntent.getActivityAsUser( + mContext, /*requestCode=*/0, intent, + PendingIntent.FLAG_IMMUTABLE, /*options=*/null, + UserHandle.of(mUserId)); } } |