summaryrefslogtreecommitdiff
path: root/core/java/android/os/Process.java
diff options
context:
space:
mode:
authorPeiyong Lin <lpy@google.com>2019-04-09 17:16:20 -0700
committerPeiyong Lin <lpy@google.com>2019-04-10 13:23:13 -0700
commit9eee3f956e0943feae9fde0f2b3656e31b628f16 (patch)
tree9f8b87184b6e449a5ac50aaae4945105fa69d316 /core/java/android/os/Process.java
parentbef3d76b16d5b5a5e8ba2c6dc48fa55dcb8b55ea (diff)
[GraphicsEnvironment] Expose API to query whether an app should use game driver.
Game Driver and ANGLE require to disable graphics driver preloading, which results in app launch time regression. Given that in early stage, only a few applications will use them, we would like to make sure Zygote prefork comes with a preloaded graphics driver, such that applications that don't go through ANGLE or Game Driver can directly use Zygote prefork without having to load the driver. BUG: 130029351 Test: Verify with testing applications. Change-Id: I8097f0f7a908be9967b08afb01dc0ce5ff7b3413
Diffstat (limited to 'core/java/android/os/Process.java')
-rw-r--r--core/java/android/os/Process.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index a7ac7a1fd689..fb35db11027b 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -513,6 +513,7 @@ public class 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 zygoteArgs Additional arguments to supply to the zygote process.
+ * @param useSystemGraphicsDriver whether the process uses system graphics driver.
*
* @return An object that describes the result of the attempt to start the process.
* @throws RuntimeException on fatal start failure
@@ -532,12 +533,13 @@ public class Process {
@Nullable String packageName,
@Nullable String[] packagesForUid,
@Nullable String sandboxId,
- @Nullable String[] zygoteArgs) {
+ @Nullable String[] zygoteArgs,
+ boolean useSystemGraphicsDriver) {
return ZYGOTE_PROCESS.start(processClass, niceName, uid, gid, gids,
runtimeFlags, mountExternal, targetSdkVersion, seInfo,
abi, instructionSet, appDataDir, invokeWith, packageName,
packagesForUid, sandboxId, /*useUnspecializedAppProcessPool=*/ true,
- zygoteArgs);
+ zygoteArgs, useSystemGraphicsDriver);
}
/** @hide */
@@ -554,12 +556,13 @@ public class Process {
@Nullable String packageName,
@Nullable String[] packagesForUid,
@Nullable String sandboxId,
- @Nullable String[] zygoteArgs) {
+ @Nullable String[] zygoteArgs,
+ boolean useSystemGraphicsDriver) {
return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids,
runtimeFlags, mountExternal, targetSdkVersion, seInfo,
abi, instructionSet, appDataDir, invokeWith, packageName,
packagesForUid, sandboxId, /*useUnspecializedAppProcessPool=*/ false,
- zygoteArgs);
+ zygoteArgs, useSystemGraphicsDriver);
}
/**