diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2019-05-20 14:00:17 -0600 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2019-07-12 09:27:41 -0600 |
| commit | 9edef25ede2325aeb69c0d2d2f08313a436f0f27 (patch) | |
| tree | c4a34f77bd935f9a7b7ffdc3f10dd8646f5cb91c /core/java/android/content/ContentInterface.java | |
| parent | 26f2c379d0c5e6f6f37419ed06d57f252b9501e7 (diff) | |
Detailed ContentProvider permissions checks.
The new MediaProvider design has an internal dynamic security model
based on the value stored in OWNER_PACKAGE_NAME, so the OS always
needs to consult the provider when resolving Uri permission grants.
Blocking calls from the system process like this are typically
discouraged, but this is the best we can do with the limited time
left, and there is existing precident with getType().
For now, use "forceUriPermissions" as a proxy for determining when
we need to consult the provider directly.
Bug: 115619667
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I1d54feeec93fbb4cf5ff55240ef4eae3a35ed068
Diffstat (limited to 'core/java/android/content/ContentInterface.java')
| -rw-r--r-- | core/java/android/content/ContentInterface.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/content/ContentInterface.java b/core/java/android/content/ContentInterface.java index d41d8d9cc1e2..197de9711296 100644 --- a/core/java/android/content/ContentInterface.java +++ b/core/java/android/content/ContentInterface.java @@ -56,6 +56,9 @@ public interface ContentInterface { public boolean refresh(@NonNull Uri uri, @Nullable Bundle args, @Nullable CancellationSignal cancellationSignal) throws RemoteException; + public int checkUriPermission(@NonNull Uri uri, int uid, @Intent.AccessUriMode int modeFlags) + throws RemoteException; + public @Nullable Uri insert(@NonNull Uri uri, @Nullable ContentValues initialValues) throws RemoteException; |
