Give DefaultContainerService all external storage.
Now we can bind to just one instance of DCS, instead of requiring one-per-user. This also means we can operate on otherwise-stopped users. Bug: 7003520 Change-Id: I4881e064ae8942907f6a02c6b868926223455cdc
This commit is contained in:
@@ -33,6 +33,9 @@ public class Environment {
|
||||
private static final String ENV_EXTERNAL_STORAGE = "EXTERNAL_STORAGE";
|
||||
private static final String ENV_EMULATED_STORAGE_TARGET = "EMULATED_STORAGE_TARGET";
|
||||
|
||||
/** {@hide} */
|
||||
public static String DIRECTORY_ANDROID = "Android";
|
||||
|
||||
private static final File ROOT_DIRECTORY
|
||||
= getDirectory("ANDROID_ROOT", "/system");
|
||||
|
||||
@@ -111,11 +114,11 @@ public class Environment {
|
||||
// /storage/sdcard0
|
||||
mExternalStorage = new File(rawExternalStorage);
|
||||
// /storage/sdcard0/Android/obb
|
||||
mExternalStorageAndroidObb = buildPath(mExternalStorage, "Android", "obb");
|
||||
mExternalStorageAndroidObb = buildPath(mExternalStorage, DIRECTORY_ANDROID, "obb");
|
||||
}
|
||||
|
||||
mExternalStorageAndroidData = buildPath(mExternalStorage, "Android", "data");
|
||||
mExternalStorageAndroidMedia = buildPath(mExternalStorage, "Android", "media");
|
||||
mExternalStorageAndroidData = buildPath(mExternalStorage, DIRECTORY_ANDROID, "data");
|
||||
mExternalStorageAndroidMedia = buildPath(mExternalStorage, DIRECTORY_ANDROID, "media");
|
||||
}
|
||||
|
||||
public File getExternalStorageDirectory() {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<uses-permission android:name="android.permission.ASEC_MOUNT_UNMOUNT"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM" />
|
||||
<uses-permission android:name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE" />
|
||||
|
||||
<application android:label="@string/service_name"
|
||||
android:allowBackup="false">
|
||||
|
||||
Reference in New Issue
Block a user