Skip to content

Commit d525baa

Browse files
committed
Add media directory, hidden for now.
Bug: 6539384 Change-Id: I8f3f7b92d27f15e82a43bb2fec02f2d9ed0280e1
1 parent 37f29ab commit d525baa

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

core/java/android/os/Environment.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,16 @@ public static File getSecureDataDirectory() {
9393
}
9494
}
9595

96+
/**
97+
* Return directory used for internal media storage, which is protected by
98+
* {@link android.Manifest.permission#WRITE_MEDIA_STORAGE}.
99+
*
100+
* @hide
101+
*/
102+
public static File getMediaStorageDirectory() {
103+
return MEDIA_STORAGE_DIRECTORY;
104+
}
105+
96106
/**
97107
* Returns whether the Encrypted File System feature is enabled on the device or not.
98108
* @return <code>true</code> if Encrypted File System feature is enabled, <code>false</code>
@@ -112,6 +122,10 @@ public static boolean isEncryptedFilesystemEnabled() {
112122
private static final File SECURE_DATA_DIRECTORY
113123
= getDirectory("ANDROID_SECURE_DATA", "/data/secure");
114124

125+
/** @hide */
126+
private static final File MEDIA_STORAGE_DIRECTORY
127+
= getDirectory("MEDIA_STORAGE", "/data/media");
128+
115129
private static final File EXTERNAL_STORAGE_DIRECTORY
116130
= getDirectory("EXTERNAL_STORAGE", "/storage/sdcard0");
117131

0 commit comments

Comments
 (0)