summaryrefslogtreecommitdiff
path: root/media/java/android/mtp/MtpStorage.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2019-12-15 22:42:42 -0700
committerJeff Sharkey <jsharkey@google.com>2019-12-18 01:35:46 +0000
commit04b4ba1e15fce6af5ccf2ff55eb35e0a763ad4fd (patch)
treeac34cf07b62978eb9159433f87179688eb31315e /media/java/android/mtp/MtpStorage.java
parentcd880e9596ed5ab3c3066a94c9f8dba6d0393d23 (diff)
Shuffling to prepare for MediaProvider APEX.
An upcoming change will move MediaStore to be within the recently created MediaProvider APEX. This means that MediaStore will need to be fully built against @SystemApi, and so this CL adjusts APIs to support a clean transition: -- Listing of "recent" storage volumes and scan paths for "internal" storage is now handled by StorageManager directly, so that partners retain control over what is deemed recent. -- StorageVolume now returns the MediaStore volume name and the filesystem directory where its contents are presented to apps. -- Conversion of legacy thumbnail "kind" values to dimensions now happens directly inside MediaStore. -- PendingParams and PendingSession are completely removed. -- Contributed media APIs are completely removed. -- Media for demo users is now surfaced as a unique StorageVolume. -- Migrate most MediaStore APIs to accept ContentResolver, which supports easy usage of ContentResolver.wrap(). Bug: 144247087, 137890034 Test: atest --test-mapping packages/providers/MediaProvider Exempt-From-Owner-Approval: in-place refactoring Change-Id: I445528b2779bb37b9f2558e67a3cfc9f60412092
Diffstat (limited to 'media/java/android/mtp/MtpStorage.java')
-rw-r--r--media/java/android/mtp/MtpStorage.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/media/java/android/mtp/MtpStorage.java b/media/java/android/mtp/MtpStorage.java
index 65d0fef74b25..c7dbca61f90a 100644
--- a/media/java/android/mtp/MtpStorage.java
+++ b/media/java/android/mtp/MtpStorage.java
@@ -41,11 +41,7 @@ public class MtpStorage {
mDescription = volume.getDescription(null);
mRemovable = volume.isRemovable();
mMaxFileSize = volume.getMaxFileSize();
- if (volume.isPrimary()) {
- mVolumeName = MediaStore.VOLUME_EXTERNAL_PRIMARY;
- } else {
- mVolumeName = volume.getNormalizedUuid();
- }
+ mVolumeName = volume.getMediaStoreVolumeName();
}
/**