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

Commit fbbd0e35 authored by Varun Shah's avatar Varun Shah
Browse files

Ensure correct user id is attached to URIs.

When attempting to grant a URI permission, the user id for which the
grant was requested for was being omitted. Update the intent which is
passed to check the uri permission.

This was a regression caused by a no-op refactoring in
change Ied529156205903f9b02b4265963fdf59f7dd7f92.

Bug: 297302560
Test: atest ContextTest
Change-Id: Ibdd01c42a61ee53c15f322fea093a8d72ae3eedf
parent 68a04679
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6563,7 +6563,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                    | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION);
            final Intent intent = new Intent();
            intent.setData(uri);
            intent.setData(ContentProvider.maybeAddUserId(uri, userId));
            intent.setFlags(modeFlags);
            final NeededUriGrants needed = mUgmInternal.checkGrantUriPermissionFromIntent(intent,