Merge "Do not enable storage app data isolation on special mount options app" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e96d92cdc0
@@ -2181,6 +2181,17 @@ public final class ProcessList {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean needsStorageDataIsolation(StorageManagerInternal storageManagerInternal,
|
||||||
|
ProcessRecord app) {
|
||||||
|
return mVoldAppDataIsolationEnabled && UserHandle.isApp(app.uid)
|
||||||
|
&& !storageManagerInternal.isExternalStorageService(app.uid)
|
||||||
|
// Special mounting mode doesn't need to have data isolation as they won't
|
||||||
|
// access /mnt/user anyway.
|
||||||
|
&& app.mountMode != Zygote.MOUNT_EXTERNAL_ANDROID_WRITABLE
|
||||||
|
&& app.mountMode != Zygote.MOUNT_EXTERNAL_PASS_THROUGH
|
||||||
|
&& app.mountMode != Zygote.MOUNT_EXTERNAL_INSTALLER;
|
||||||
|
}
|
||||||
|
|
||||||
private Process.ProcessStartResult startProcess(HostingRecord hostingRecord, String entryPoint,
|
private Process.ProcessStartResult startProcess(HostingRecord hostingRecord, String entryPoint,
|
||||||
ProcessRecord app, int uid, int[] gids, int runtimeFlags, int zygotePolicyFlags,
|
ProcessRecord app, int uid, int[] gids, int runtimeFlags, int zygotePolicyFlags,
|
||||||
int mountExternal, String seInfo, String requiredAbi, String instructionSet,
|
int mountExternal, String seInfo, String requiredAbi, String instructionSet,
|
||||||
@@ -2237,8 +2248,7 @@ public final class ProcessList {
|
|||||||
int userId = UserHandle.getUserId(uid);
|
int userId = UserHandle.getUserId(uid);
|
||||||
StorageManagerInternal storageManagerInternal = LocalServices.getService(
|
StorageManagerInternal storageManagerInternal = LocalServices.getService(
|
||||||
StorageManagerInternal.class);
|
StorageManagerInternal.class);
|
||||||
if (mVoldAppDataIsolationEnabled && UserHandle.isApp(app.uid)
|
if (needsStorageDataIsolation(storageManagerInternal, app)) {
|
||||||
&& !storageManagerInternal.isExternalStorageService(uid)) {
|
|
||||||
bindMountAppStorageDirs = true;
|
bindMountAppStorageDirs = true;
|
||||||
if (pkgDataInfoMap == null ||
|
if (pkgDataInfoMap == null ||
|
||||||
!storageManagerInternal.prepareStorageDirs(userId, pkgDataInfoMap.keySet(),
|
!storageManagerInternal.prepareStorageDirs(userId, pkgDataInfoMap.keySet(),
|
||||||
|
|||||||
Reference in New Issue
Block a user