diff options
author | Jeff Sharkey <jsharkey@android.com> | 2014-05-30 15:38:35 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2014-05-30 16:26:45 -0700 |
commit | 2ee3c1e189819cc6efb4d7de24f1438bdb824087 (patch) | |
tree | 720b998ef3649c638848bfad692689dbabef4a7f /services | |
parent | b2f4bc8727f1df9d88f56a15c08cbf2cb8e2993c (diff) | |
download | frameworks_base-2ee3c1e189819cc6efb4d7de24f1438bdb824087.zip frameworks_base-2ee3c1e189819cc6efb4d7de24f1438bdb824087.tar.gz frameworks_base-2ee3c1e189819cc6efb4d7de24f1438bdb824087.tar.bz2 |
Per-app media directories on external storage.
This change defines per-app directories on external storage that
will be scanned and included in MediaStore. This gives apps a way
to write content to secondary shared storage in a way that can
easily be surfaced to other apps.
Bug: 14382377
Change-Id: I4cb367c870509e76f0c2c598f01e2f699780030a
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/MountService.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java index d5f045e..d31fb60 100644 --- a/services/core/java/com/android/server/MountService.java +++ b/services/core/java/com/android/server/MountService.java @@ -2372,6 +2372,18 @@ class MountService extends IMountService.Stub } } + voldPath = maybeTranslatePathForVold(appPath, + userEnv.buildExternalStorageAppMediaDirs(callingPkg), + userEnv.buildExternalStorageAppMediaDirsForVold(callingPkg)); + if (voldPath != null) { + try { + mConnector.execute("volume", "mkdirs", voldPath); + return 0; + } catch (NativeDaemonConnectorException e) { + return e.getCode(); + } + } + throw new SecurityException("Invalid mkdirs path: " + appPath); } |