Loading core/java/android/os/Process.java +2 −5 Original line number Diff line number Diff line Loading @@ -505,7 +505,6 @@ public class Process { * @param invokeWith null-ok the command to invoke with. * @param packageName null-ok the name of the package this process belongs to. * @param packagesForUid null-ok all the packages with the same uid as this process. * @param visibleVols null-ok storage volumes that can be accessed by this process. * @param zygoteArgs Additional arguments to supply to the zygote process. * * @return An object that describes the result of the attempt to start the process. Loading @@ -525,13 +524,12 @@ public class Process { @Nullable String invokeWith, @Nullable String packageName, @Nullable String[] packagesForUid, @Nullable String[] visibleVols, @Nullable String sandboxId, @Nullable String[] zygoteArgs) { return ZYGOTE_PROCESS.start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, packagesForUid, visibleVols, sandboxId, /*useBlastulaPool=*/ true, zygoteArgs); packagesForUid, sandboxId, /*useBlastulaPool=*/ true, zygoteArgs); } /** @hide */ Loading @@ -547,13 +545,12 @@ public class Process { @Nullable String invokeWith, @Nullable String packageName, @Nullable String[] packagesForUid, @Nullable String[] visibleVols, @Nullable String sandboxId, @Nullable String[] zygoteArgs) { return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, packagesForUid, visibleVols, sandboxId, /*useBlastulaPool=*/ false, zygoteArgs); packagesForUid, sandboxId, /*useBlastulaPool=*/ false, zygoteArgs); } /** Loading core/java/android/os/ZygoteProcess.java +2 −19 Original line number Diff line number Diff line Loading @@ -305,7 +305,6 @@ public class ZygoteProcess { * @param invokeWith null-ok the command to invoke with. * @param packageName null-ok the name of the package this process belongs to. * @param packagesForUid null-ok all the packages with the same uid as this process. * @param visibleVols null-ok storage volumes that can be accessed by this process. * @param zygoteArgs Additional arguments to supply to the zygote process. * * @return An object that describes the result of the attempt to start the process. Loading @@ -323,7 +322,6 @@ public class ZygoteProcess { @Nullable String invokeWith, @Nullable String packageName, @Nullable String[] packagesForUid, @Nullable String[] visibleVols, @Nullable String sandboxId, boolean useBlastulaPool, @Nullable String[] zygoteArgs) { Loading @@ -339,7 +337,7 @@ public class ZygoteProcess { return startViaZygote(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, /*startChildZygote=*/false, packageName, packagesForUid, visibleVols, sandboxId, packageName, packagesForUid, sandboxId, useBlastulaPool, zygoteArgs); } catch (ZygoteStartFailedEx ex) { Log.e(LOG_TAG, Loading Loading @@ -531,7 +529,6 @@ public class ZygoteProcess { * that has its state cloned from this zygote process. * @param packageName null-ok the name of the package this process belongs to. * @param packagesForUid null-ok all the packages with the same uid as this process. * @param visibleVols null-ok storage volumes that can be accessed by this process. * @param extraArgs Additional arguments to supply to the zygote process. * @return An object that describes the result of the attempt to start the process. * @throws ZygoteStartFailedEx if process start failed for any reason Loading @@ -550,7 +547,6 @@ public class ZygoteProcess { boolean startChildZygote, @Nullable String packageName, @Nullable String[] packagesForUid, @Nullable String[] visibleVols, @Nullable String sandboxId, boolean useBlastulaPool, @Nullable String[] extraArgs) Loading Loading @@ -638,19 +634,6 @@ public class ZygoteProcess { argsForZygote.add(sb.toString()); } if (visibleVols != null && visibleVols.length > 0) { final StringBuilder sb = new StringBuilder(); sb.append("--visible-vols="); for (int i = 0; i < visibleVols.length; ++i) { if (i != 0) { sb.append(','); } sb.append(visibleVols[i]); } argsForZygote.add(sb.toString()); } if (sandboxId != null) { argsForZygote.add("--sandbox-id=" + sandboxId); } Loading Loading @@ -1061,7 +1044,7 @@ public class ZygoteProcess { gids, runtimeFlags, 0 /* mountExternal */, 0 /* targetSdkVersion */, seInfo, abi, instructionSet, null /* appDataDir */, null /* invokeWith */, true /* startChildZygote */, null /* packageName */, null /* packagesForUid */, null /* visibleVolumes */, null /* sandboxId */, null /* packagesForUid */, null /* sandboxId */, false /* useBlastulaPool */, extraArgs); } catch (ZygoteStartFailedEx ex) { throw new RuntimeException("Starting child-zygote through Zygote failed", ex); Loading core/java/android/os/storage/StorageManagerInternal.java +0 −5 Original line number Diff line number Diff line Loading @@ -108,11 +108,6 @@ public abstract class StorageManagerInternal { public abstract void destroySandboxForApp(@NonNull String packageName, @Nullable String sharedUserId, int userId); /** * @return Labels of storage volumes that are visible to the given userId. */ public abstract String[] getVisibleVolumesForUser(int userId); /** * A listener for reset events in the StorageManagerService. */ Loading core/java/com/android/internal/os/Zygote.java +7 −7 Original line number Diff line number Diff line Loading @@ -236,14 +236,14 @@ public final class Zygote { public static int forkAndSpecialize(int uid, int gid, int[] gids, int runtimeFlags, int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose, int[] fdsToIgnore, boolean startChildZygote, String instructionSet, String appDataDir, String packageName, String[] packagesForUID, String[] visibleVolIDs, String sandboxId) { String packageName, String[] packagesForUID, String sandboxId) { ZygoteHooks.preFork(); // Resets nice priority for zygote process. resetNicePriority(); int pid = nativeForkAndSpecialize( uid, gid, gids, runtimeFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose, fdsToIgnore, startChildZygote, instructionSet, appDataDir, packageName, packagesForUID, visibleVolIDs, sandboxId); packagesForUID, sandboxId); // Enable tracing as soon as possible for the child process. if (pid == 0) { Trace.setTracingEnabled(true, runtimeFlags); Loading @@ -258,7 +258,7 @@ public final class Zygote { private static native int nativeForkAndSpecialize(int uid, int gid, int[] gids, int runtimeFlags, int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose, int[] fdsToIgnore, boolean startChildZygote, String instructionSet, String appDataDir, String packageName, String[] packagesForUID, String[] visibleVolIDs, String appDataDir, String packageName, String[] packagesForUID, String sandboxId); /** Loading @@ -285,11 +285,11 @@ public final class Zygote { public static void specializeBlastula(int uid, int gid, int[] gids, int runtimeFlags, int[][] rlimits, int mountExternal, String seInfo, String niceName, boolean startChildZygote, String instructionSet, String appDataDir, String packageName, String[] packagesForUID, String[] visibleVolIDs, String sandboxId) { String[] packagesForUID, String sandboxId) { nativeSpecializeBlastula(uid, gid, gids, runtimeFlags, rlimits, mountExternal, seInfo, niceName, startChildZygote, instructionSet, appDataDir, packageName, packagesForUID, visibleVolIDs, sandboxId); packageName, packagesForUID, sandboxId); // Enable tracing as soon as possible for the child process. Trace.setTracingEnabled(true, runtimeFlags); Loading @@ -309,7 +309,7 @@ public final class Zygote { private static native void nativeSpecializeBlastula(int uid, int gid, int[] gids, int runtimeFlags, int[][] rlimits, int mountExternal, String seInfo, String niceName, boolean startChildZygote, String instructionSet, String appDataDir, String packageName, String[] packagesForUID, String[] visibleVolIDs, String sandboxId); String[] packagesForUID, String sandboxId); /** * Called to do any initialization before starting an application. Loading Loading @@ -600,7 +600,7 @@ public final class Zygote { args.mRuntimeFlags, rlimits, args.mMountExternal, args.mSeInfo, args.mNiceName, args.mStartChildZygote, args.mInstructionSet, args.mAppDataDir, args.mPackageName, args.mPackagesForUid, args.mVisibleVolIds, args.mSandboxId); args.mPackagesForUid, args.mSandboxId); if (args.mNiceName != null) { Process.setArgV0(args.mNiceName); Loading core/java/com/android/internal/os/ZygoteArguments.java +0 −5 Original line number Diff line number Diff line Loading @@ -116,9 +116,6 @@ class ZygoteArguments { /** from --packages-for-uid */ String[] mPackagesForUid; /** from --visible-vols */ String[] mVisibleVolIds; /** from --sandbox-id */ String mSandboxId; Loading Loading @@ -395,8 +392,6 @@ class ZygoteArguments { mPackageName = arg.substring(arg.indexOf('=') + 1); } else if (arg.startsWith("--packages-for-uid=")) { mPackagesForUid = arg.substring(arg.indexOf('=') + 1).split(","); } else if (arg.startsWith("--visible-vols=")) { mVisibleVolIds = arg.substring(arg.indexOf('=') + 1).split(","); } else if (arg.startsWith("--sandbox-id=")) { if (mSandboxId != null) { throw new IllegalArgumentException("Duplicate arg specified"); Loading Loading
core/java/android/os/Process.java +2 −5 Original line number Diff line number Diff line Loading @@ -505,7 +505,6 @@ public class Process { * @param invokeWith null-ok the command to invoke with. * @param packageName null-ok the name of the package this process belongs to. * @param packagesForUid null-ok all the packages with the same uid as this process. * @param visibleVols null-ok storage volumes that can be accessed by this process. * @param zygoteArgs Additional arguments to supply to the zygote process. * * @return An object that describes the result of the attempt to start the process. Loading @@ -525,13 +524,12 @@ public class Process { @Nullable String invokeWith, @Nullable String packageName, @Nullable String[] packagesForUid, @Nullable String[] visibleVols, @Nullable String sandboxId, @Nullable String[] zygoteArgs) { return ZYGOTE_PROCESS.start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, packagesForUid, visibleVols, sandboxId, /*useBlastulaPool=*/ true, zygoteArgs); packagesForUid, sandboxId, /*useBlastulaPool=*/ true, zygoteArgs); } /** @hide */ Loading @@ -547,13 +545,12 @@ public class Process { @Nullable String invokeWith, @Nullable String packageName, @Nullable String[] packagesForUid, @Nullable String[] visibleVols, @Nullable String sandboxId, @Nullable String[] zygoteArgs) { return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, packagesForUid, visibleVols, sandboxId, /*useBlastulaPool=*/ false, zygoteArgs); packagesForUid, sandboxId, /*useBlastulaPool=*/ false, zygoteArgs); } /** Loading
core/java/android/os/ZygoteProcess.java +2 −19 Original line number Diff line number Diff line Loading @@ -305,7 +305,6 @@ public class ZygoteProcess { * @param invokeWith null-ok the command to invoke with. * @param packageName null-ok the name of the package this process belongs to. * @param packagesForUid null-ok all the packages with the same uid as this process. * @param visibleVols null-ok storage volumes that can be accessed by this process. * @param zygoteArgs Additional arguments to supply to the zygote process. * * @return An object that describes the result of the attempt to start the process. Loading @@ -323,7 +322,6 @@ public class ZygoteProcess { @Nullable String invokeWith, @Nullable String packageName, @Nullable String[] packagesForUid, @Nullable String[] visibleVols, @Nullable String sandboxId, boolean useBlastulaPool, @Nullable String[] zygoteArgs) { Loading @@ -339,7 +337,7 @@ public class ZygoteProcess { return startViaZygote(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, /*startChildZygote=*/false, packageName, packagesForUid, visibleVols, sandboxId, packageName, packagesForUid, sandboxId, useBlastulaPool, zygoteArgs); } catch (ZygoteStartFailedEx ex) { Log.e(LOG_TAG, Loading Loading @@ -531,7 +529,6 @@ public class ZygoteProcess { * that has its state cloned from this zygote process. * @param packageName null-ok the name of the package this process belongs to. * @param packagesForUid null-ok all the packages with the same uid as this process. * @param visibleVols null-ok storage volumes that can be accessed by this process. * @param extraArgs Additional arguments to supply to the zygote process. * @return An object that describes the result of the attempt to start the process. * @throws ZygoteStartFailedEx if process start failed for any reason Loading @@ -550,7 +547,6 @@ public class ZygoteProcess { boolean startChildZygote, @Nullable String packageName, @Nullable String[] packagesForUid, @Nullable String[] visibleVols, @Nullable String sandboxId, boolean useBlastulaPool, @Nullable String[] extraArgs) Loading Loading @@ -638,19 +634,6 @@ public class ZygoteProcess { argsForZygote.add(sb.toString()); } if (visibleVols != null && visibleVols.length > 0) { final StringBuilder sb = new StringBuilder(); sb.append("--visible-vols="); for (int i = 0; i < visibleVols.length; ++i) { if (i != 0) { sb.append(','); } sb.append(visibleVols[i]); } argsForZygote.add(sb.toString()); } if (sandboxId != null) { argsForZygote.add("--sandbox-id=" + sandboxId); } Loading Loading @@ -1061,7 +1044,7 @@ public class ZygoteProcess { gids, runtimeFlags, 0 /* mountExternal */, 0 /* targetSdkVersion */, seInfo, abi, instructionSet, null /* appDataDir */, null /* invokeWith */, true /* startChildZygote */, null /* packageName */, null /* packagesForUid */, null /* visibleVolumes */, null /* sandboxId */, null /* packagesForUid */, null /* sandboxId */, false /* useBlastulaPool */, extraArgs); } catch (ZygoteStartFailedEx ex) { throw new RuntimeException("Starting child-zygote through Zygote failed", ex); Loading
core/java/android/os/storage/StorageManagerInternal.java +0 −5 Original line number Diff line number Diff line Loading @@ -108,11 +108,6 @@ public abstract class StorageManagerInternal { public abstract void destroySandboxForApp(@NonNull String packageName, @Nullable String sharedUserId, int userId); /** * @return Labels of storage volumes that are visible to the given userId. */ public abstract String[] getVisibleVolumesForUser(int userId); /** * A listener for reset events in the StorageManagerService. */ Loading
core/java/com/android/internal/os/Zygote.java +7 −7 Original line number Diff line number Diff line Loading @@ -236,14 +236,14 @@ public final class Zygote { public static int forkAndSpecialize(int uid, int gid, int[] gids, int runtimeFlags, int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose, int[] fdsToIgnore, boolean startChildZygote, String instructionSet, String appDataDir, String packageName, String[] packagesForUID, String[] visibleVolIDs, String sandboxId) { String packageName, String[] packagesForUID, String sandboxId) { ZygoteHooks.preFork(); // Resets nice priority for zygote process. resetNicePriority(); int pid = nativeForkAndSpecialize( uid, gid, gids, runtimeFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose, fdsToIgnore, startChildZygote, instructionSet, appDataDir, packageName, packagesForUID, visibleVolIDs, sandboxId); packagesForUID, sandboxId); // Enable tracing as soon as possible for the child process. if (pid == 0) { Trace.setTracingEnabled(true, runtimeFlags); Loading @@ -258,7 +258,7 @@ public final class Zygote { private static native int nativeForkAndSpecialize(int uid, int gid, int[] gids, int runtimeFlags, int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose, int[] fdsToIgnore, boolean startChildZygote, String instructionSet, String appDataDir, String packageName, String[] packagesForUID, String[] visibleVolIDs, String appDataDir, String packageName, String[] packagesForUID, String sandboxId); /** Loading @@ -285,11 +285,11 @@ public final class Zygote { public static void specializeBlastula(int uid, int gid, int[] gids, int runtimeFlags, int[][] rlimits, int mountExternal, String seInfo, String niceName, boolean startChildZygote, String instructionSet, String appDataDir, String packageName, String[] packagesForUID, String[] visibleVolIDs, String sandboxId) { String[] packagesForUID, String sandboxId) { nativeSpecializeBlastula(uid, gid, gids, runtimeFlags, rlimits, mountExternal, seInfo, niceName, startChildZygote, instructionSet, appDataDir, packageName, packagesForUID, visibleVolIDs, sandboxId); packageName, packagesForUID, sandboxId); // Enable tracing as soon as possible for the child process. Trace.setTracingEnabled(true, runtimeFlags); Loading @@ -309,7 +309,7 @@ public final class Zygote { private static native void nativeSpecializeBlastula(int uid, int gid, int[] gids, int runtimeFlags, int[][] rlimits, int mountExternal, String seInfo, String niceName, boolean startChildZygote, String instructionSet, String appDataDir, String packageName, String[] packagesForUID, String[] visibleVolIDs, String sandboxId); String[] packagesForUID, String sandboxId); /** * Called to do any initialization before starting an application. Loading Loading @@ -600,7 +600,7 @@ public final class Zygote { args.mRuntimeFlags, rlimits, args.mMountExternal, args.mSeInfo, args.mNiceName, args.mStartChildZygote, args.mInstructionSet, args.mAppDataDir, args.mPackageName, args.mPackagesForUid, args.mVisibleVolIds, args.mSandboxId); args.mPackagesForUid, args.mSandboxId); if (args.mNiceName != null) { Process.setArgV0(args.mNiceName); Loading
core/java/com/android/internal/os/ZygoteArguments.java +0 −5 Original line number Diff line number Diff line Loading @@ -116,9 +116,6 @@ class ZygoteArguments { /** from --packages-for-uid */ String[] mPackagesForUid; /** from --visible-vols */ String[] mVisibleVolIds; /** from --sandbox-id */ String mSandboxId; Loading Loading @@ -395,8 +392,6 @@ class ZygoteArguments { mPackageName = arg.substring(arg.indexOf('=') + 1); } else if (arg.startsWith("--packages-for-uid=")) { mPackagesForUid = arg.substring(arg.indexOf('=') + 1).split(","); } else if (arg.startsWith("--visible-vols=")) { mVisibleVolIds = arg.substring(arg.indexOf('=') + 1).split(","); } else if (arg.startsWith("--sandbox-id=")) { if (mSandboxId != null) { throw new IllegalArgumentException("Duplicate arg specified"); Loading