Allowing content uris with cloneUserId to be accessed by parent user.
In some cases a userId maybe appended to the contentUri, to determine the storage location of the content, ex: `content://10@media/external/images/media/000001.png` This has started in systemui/screenshot, where ag/19783114 appended the userId of the foreground user in ScreenShot Content Uris. However, this change gives error while saving screenshots in cloned apps, as the userId appended is different from the MediaProvider Process trying to save the content (MP of user 0 is used for clonedProfile). The error is triggerred from `ContentProvider.validateIncomingUri` We add the check that if the ContentAuthorityUser shares Media with a parentUser, and the latter is same as the MP process user, we do not throw the above error. Bug: b/270350104 Test: Manual verification on device Change-Id: I62e87c4f04840573138ed59918cc869d1ab12dea
Loading
Please register or sign in to comment