From e44e13477651ff10b424ca8427201ba58b100cb5 Mon Sep 17 00:00:00 2001 From: atrost Date: Wed, 11 Dec 2019 18:44:20 +0000 Subject: Pipe disabled compat changes to runtime through zygote. Test: Java in process API still work correctly - tested locally with test app + adb overrides. Test: atest com.android.internal.os Test: atest com.android.server.am Bug: 145743810 Change-Id: I6645a7ec767400cd579207f0eed1e6e7136c8a6f Merged-In: I6645a7ec767400cd579207f0eed1e6e7136c8a6f --- core/java/android/os/Process.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'core/java/android/os/Process.java') diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 450bfaef50d4..1130f1db6256 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -519,11 +519,12 @@ public class Process { * @param appDataDir null-ok the data directory of the app. * @param invokeWith null-ok the command to invoke with. * @param packageName null-ok the name of the package this process belongs to. - * + * @param disabledCompatChanges null-ok list of disabled compat changes for the process being + * started. * @param zygoteArgs Additional arguments to supply to the zygote process. * @return An object that describes the result of the attempt to start the process. * @throws RuntimeException on fatal start failure - * + * * {@hide} */ public static ProcessStartResult start(@NonNull final String processClass, @@ -538,11 +539,12 @@ public class Process { @Nullable String appDataDir, @Nullable String invokeWith, @Nullable String packageName, + @Nullable long[] disabledCompatChanges, @Nullable String[] zygoteArgs) { return ZYGOTE_PROCESS.start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, - /*useUsapPool=*/ true, zygoteArgs); + /*useUsapPool=*/ true, disabledCompatChanges, zygoteArgs); } /** @hide */ @@ -558,11 +560,12 @@ public class Process { @Nullable String appDataDir, @Nullable String invokeWith, @Nullable String packageName, + @Nullable long[] disabledCompatChanges, @Nullable String[] zygoteArgs) { return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, - /*useUsapPool=*/ false, zygoteArgs); + /*useUsapPool=*/ false, disabledCompatChanges, zygoteArgs); } /** -- cgit v1.2.3