Allow multi users for building permission transfer intent
Auto uses user 10, so we need to support multi users by using getActivityAsUser Bug: 244429866 Test: atest CtsCompanionDeviceManagerUiAutomationTestCases Change-Id: I5ca6db3f3427589dab34ccc34ac20379f2db48a7
This commit is contained in:
@@ -150,8 +150,9 @@ public class SystemDataTransferProcessor {
|
||||
// Create a PendingIntent
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
return PendingIntent.getActivity(mContext, /*requestCode */ associationId, intent,
|
||||
FLAG_ONE_SHOT | FLAG_CANCEL_CURRENT | FLAG_IMMUTABLE);
|
||||
return PendingIntent.getActivityAsUser(mContext, /*requestCode */ associationId, intent,
|
||||
FLAG_ONE_SHOT | FLAG_CANCEL_CURRENT | FLAG_IMMUTABLE, /* options= */ null,
|
||||
UserHandle.CURRENT);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user