summaryrefslogtreecommitdiff
path: root/packages/ExternalStorageProvider/src
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2019-12-18 14:06:48 -0700
committerJeff Sharkey <jsharkey@google.com>2019-12-19 22:16:00 +0000
commit40182833f712666dad3f5405e61a28d856af5b84 (patch)
tree75b35a7b5c515778ad0ce4d019ce0d9acd90d7f3 /packages/ExternalStorageProvider/src
parent8cb0e1cfb7e21c74d7511d9c99530a837142d3e4 (diff)
Move MediaStore.java inside APEX boundary.
Recent work has paved the way to get MediaStore.java building against "core_platform", and this change is actually shifting MediaStore.java inside the MediaProvider APEX boundary. This involves defining a new "updatable-mediaprovider" library JAR and ensuring that it's spliced into classpaths where needed to keep everything building and working. Note that the MediaProvider APK itself is still bundled, so we're manually including the MediaStore.java when building that APK so that we can continue referencing @hide symbols, but there's a STOPSHIP comment to remove that once we get the APK building against "system_current". Bug: 144247087 Test: atest --test-mapping packages/providers/MediaProvider Change-Id: I27ed3fde40751d9ac136a31710c62004b1b8962f
Diffstat (limited to 'packages/ExternalStorageProvider/src')
-rw-r--r--packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 7b2922ba961b..1e19786f5d41 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -102,6 +102,9 @@ public class ExternalStorageProvider extends FileSystemProvider {
DocumentsContract.EXTERNAL_STORAGE_PRIMARY_EMULATED_ROOT_ID;
private static final String ROOT_ID_HOME = "home";
+ private static final String GET_DOCUMENT_URI_CALL = "get_document_uri";
+ private static final String GET_MEDIA_URI_CALL = "get_media_uri";
+
private StorageManager mStorageManager;
private UserManager mUserManager;
@@ -665,7 +668,7 @@ public class ExternalStorageProvider extends FileSystemProvider {
}
break;
}
- case MediaStore.GET_DOCUMENT_URI_CALL: {
+ case GET_DOCUMENT_URI_CALL: {
// All callers must go through MediaProvider
getContext().enforceCallingPermission(
android.Manifest.permission.WRITE_MEDIA_STORAGE, TAG);
@@ -684,7 +687,7 @@ public class ExternalStorageProvider extends FileSystemProvider {
throw new IllegalStateException("File in " + path + " is not found.", e);
}
}
- case MediaStore.GET_MEDIA_URI_CALL: {
+ case GET_MEDIA_URI_CALL: {
// All callers must go through MediaProvider
getContext().enforceCallingPermission(
android.Manifest.permission.WRITE_MEDIA_STORAGE, TAG);