am 3451dc90: Merge "Iteration on multi-user external storage." into jb-mr1-dev

* commit '3451dc90648b8bd176030425ce91c019460ba88c':
  Iteration on multi-user external storage.
This commit is contained in:
Jeff Sharkey
2012-08-22 18:20:52 -07:00
committed by Android Git Automerger
3 changed files with 5 additions and 14 deletions

View File

@@ -582,9 +582,7 @@ public class Process {
if ((debugFlags & Zygote.DEBUG_ENABLE_ASSERT) != 0) {
argsForZygote.add("--enable-assert");
}
if (mountExternal == Zygote.MOUNT_EXTERNAL_SINGLEUSER) {
argsForZygote.add("--mount-external-singleuser");
} else if (mountExternal == Zygote.MOUNT_EXTERNAL_MULTIUSER) {
if (mountExternal == Zygote.MOUNT_EXTERNAL_MULTIUSER) {
argsForZygote.add("--mount-external-multiuser");
}
argsForZygote.add("--target-sdk-version=" + targetSdkVersion);

View File

@@ -527,8 +527,6 @@ class ZygoteConnection {
"Duplicate arg specified");
}
niceName = arg.substring(arg.indexOf('=') + 1);
} else if (arg.equals("--mount-external-singleuser")) {
mountExternal = Zygote.MOUNT_EXTERNAL_SINGLEUSER;
} else if (arg.equals("--mount-external-multiuser")) {
mountExternal = Zygote.MOUNT_EXTERNAL_MULTIUSER;
} else {

View File

@@ -1983,18 +1983,13 @@ public final class ActivityManagerService extends ActivityManagerNative
try {
final PackageManager pm = mContext.getPackageManager();
gids = pm.getPackageGids(app.info.packageName);
if (pm.checkPermission(
android.Manifest.permission.READ_EXTERNAL_STORAGE, app.info.packageName)
== PERMISSION_GRANTED) {
if (Environment.isExternalStorageEmulated()) {
mountExternal = Zygote.MOUNT_EXTERNAL_MULTIUSER;
} else {
mountExternal = Zygote.MOUNT_EXTERNAL_SINGLEUSER;
}
}
} catch (PackageManager.NameNotFoundException e) {
Slog.w(TAG, "Unable to retrieve gids", e);
}
if (Environment.isExternalStorageEmulated()) {
mountExternal = Zygote.MOUNT_EXTERNAL_MULTIUSER;
}
}
if (mFactoryTest != SystemServer.FACTORY_TEST_OFF) {
if (mFactoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL