Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Create pending intent for specific user
Browse files Browse the repository at this point in the history
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
  • Loading branch information
reemab1 authored and thestinger committed Dec 4, 2023
1 parent 24e8f07 commit 98c4928
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
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;

Expand Down Expand Up @@ -171,7 +172,9 @@ public PendingIntent createPendingIntent(
.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));
}
}

0 comments on commit 98c4928

Please sign in to comment.