Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e96d92cd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Do not enable storage app data isolation on special mount options app" into rvc-dev

parents c47d9622 9422a707
Loading
Loading
Loading
Loading
+12 −2
Original line number Original line Diff line number Diff line
@@ -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(),