Merge "Fix CDM.requestNotificationAccess() in profile." am: ca576d4b3b am: 2a59e10d69 am: 6742862495 am: b7d8dc7082

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1415449

Change-Id: I258557b8b668ced529a69203fe589570feaf0de4
This commit is contained in:
Eugene Susla
2020-08-31 21:05:12 +00:00
committed by Automerger Merge Worker

View File

@@ -391,12 +391,14 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
.toString());
long identity = Binder.clearCallingIdentity();
try {
return PendingIntent.getActivity(getContext(),
return PendingIntent.getActivityAsUser(getContext(),
0 /* request code */,
NotificationAccessConfirmationActivityContract.launcherIntent(
userId, component, packageTitle),
PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_ONE_SHOT
| PendingIntent.FLAG_CANCEL_CURRENT);
| PendingIntent.FLAG_CANCEL_CURRENT,
null /* options */,
new UserHandle(userId));
} finally {
Binder.restoreCallingIdentity(identity);
}