diff options
| author | Chris Wailes <chriswailes@google.com> | 2019-04-17 17:55:48 -0700 |
|---|---|---|
| committer | Christian Wailes <chriswailes@google.com> | 2019-04-24 17:43:15 +0000 |
| commit | 35fdbc570b4e905bcaa7892b70bd074894384cc5 (patch) | |
| tree | 73ff96ad5858abd2ab8765888ae5cb12fc17f3c7 /core/java/android/os/Process.java | |
| parent | dc7de2711341126b11529c46b2bab56aae994f91 (diff) | |
Load the default graphics driver in USAPs.
This patch causes unspecialized app processes to load the OpenGL driver
after they are forked. The ZygoteProcess code will then take an
application's driver preference into account when selecting how to
launch it.
Test: m & boot & launch & inspect traces for driver loading
Bug: 130029351
Change-Id: If6fa02f9c387596162e75a685b04208b45a5c86b
Merged-In: If6fa02f9c387596162e75a685b04208b45a5c86b
(cherry picked from commit 301a1c46da930bb927bd86227c6e1d44c70c349d)
Diffstat (limited to 'core/java/android/os/Process.java')
| -rw-r--r-- | core/java/android/os/Process.java | 74 |
1 files changed, 38 insertions, 36 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index fb35db11027b..b82b5ef3f0ba 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -512,57 +512,59 @@ 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 zygoteArgs Additional arguments to supply to the zygote process. * @param useSystemGraphicsDriver whether the process uses system graphics driver. - * + * + * @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 final ProcessStartResult start(@NonNull final String processClass, - @Nullable final String niceName, - int uid, int gid, @Nullable int[] gids, - int runtimeFlags, int mountExternal, - int targetSdkVersion, - @Nullable String seInfo, - @NonNull String abi, - @Nullable String instructionSet, - @Nullable String appDataDir, - @Nullable String invokeWith, - @Nullable String packageName, - @Nullable String[] packagesForUid, - @Nullable String sandboxId, - @Nullable String[] zygoteArgs, - boolean useSystemGraphicsDriver) { + public static ProcessStartResult start(@NonNull final String processClass, + @Nullable final String niceName, + int uid, int gid, @Nullable int[] gids, + int runtimeFlags, + int mountExternal, + int targetSdkVersion, + @Nullable String seInfo, + @NonNull String abi, + @Nullable String instructionSet, + @Nullable String appDataDir, + @Nullable String invokeWith, + @Nullable String packageName, + @Nullable String[] packagesForUid, + @Nullable String sandboxId, + boolean useSystemGraphicsDriver, + @Nullable String[] zygoteArgs) { return ZYGOTE_PROCESS.start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, - packagesForUid, sandboxId, /*useUnspecializedAppProcessPool=*/ true, - zygoteArgs, useSystemGraphicsDriver); + packagesForUid, sandboxId, /*useUsapPool=*/ true, + useSystemGraphicsDriver, zygoteArgs); } /** @hide */ - public static final ProcessStartResult startWebView(@NonNull final String processClass, - @Nullable final String niceName, - int uid, int gid, @Nullable int[] gids, - int runtimeFlags, int mountExternal, - int targetSdkVersion, - @Nullable String seInfo, - @NonNull String abi, - @Nullable String instructionSet, - @Nullable String appDataDir, - @Nullable String invokeWith, - @Nullable String packageName, - @Nullable String[] packagesForUid, - @Nullable String sandboxId, - @Nullable String[] zygoteArgs, - boolean useSystemGraphicsDriver) { + public static ProcessStartResult startWebView(@NonNull final String processClass, + @Nullable final String niceName, + int uid, int gid, @Nullable int[] gids, + int runtimeFlags, + int mountExternal, + int targetSdkVersion, + @Nullable String seInfo, + @NonNull String abi, + @Nullable String instructionSet, + @Nullable String appDataDir, + @Nullable String invokeWith, + @Nullable String packageName, + @Nullable String[] packagesForUid, + @Nullable String sandboxId, + boolean useSystemGraphicsDriver, + @Nullable String[] zygoteArgs) { return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, - packagesForUid, sandboxId, /*useUnspecializedAppProcessPool=*/ false, - zygoteArgs, useSystemGraphicsDriver); + packagesForUid, sandboxId, /*useUsapPool=*/ false, + useSystemGraphicsDriver, zygoteArgs); } /** |
