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

Skip to content
Commit eeccbd76 authored by Azhara Assanova's avatar Azhara Assanova
Browse files

Add new API Context#checkContentUriPermission

Currently, apps can't check if an app has access to a content URI. That
is because the existing checkUriPermission() API is limited to checking
permissions via URI grant flags. Hence, this change adds a new API that
focuses on content URIs and on top of grant flags, it checks for general
access to the URI's content provider.

In addition to this API, we'll be introducing Activity APIs and a
Manifest attribute to help apps with checking content URI permissions on
activity callers.

Finally, to minimise code duplication, we merged checkUriPermission()'s
implementation in ActivityManagerService and UriGrantsManagerInternal.

Bug: 293467489
Test: atest WmTests:ActivityStarterTests
Test: atest FrameworksServicesTests:com.android.server.uri
Test: atest CtsWindowManagerDeviceActivity:ActivityStarterTests
Test: atest CtsWindowManagerDeviceWindow:CrossAppDragAndDropTests
Test: atest AppEnumerationTests
Test: atest CtsContentTestCases:android.content.cts.ContextTest
Change-Id: I61a0574e3979702ed32f4d926c664f134046f555
parent e4584f38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment