diff options
Diffstat (limited to 'core/java/android/os/Process.java')
| -rw-r--r-- | core/java/android/os/Process.java | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 1c0f0f42a5dc..994ed2148baa 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -487,6 +487,40 @@ public class Process { private static long sStartUptimeMillis; /** + * Value used to indicate that there is no special information about an application launch. App + * launches with this policy will occur through the primary or secondary Zygote with no special + * treatment. + * + * @hide + */ + public static final int ZYGOTE_POLICY_FLAG_EMPTY = 0; + + /** + * Flag used to indicate that an application launch is user-visible and latency sensitive. Any + * launch with this policy will use a Unspecialized App Process Pool if the target Zygote + * supports it. + * + * @hide + */ + public static final int ZYGOTE_POLICY_FLAG_LATENCY_SENSITIVE = 1 << 0; + + /** + * Flag used to indicate that the launch is one in a series of app launches that will be + * performed in quick succession. For future use. + * + * @hide + */ + public static final int ZYGOTE_POLICY_FLAG_BATCH_LAUNCH = 1 << 1; + + /** + * Flag used to indicate that the current launch event is for a system process. All system + * processes are equally important, so none of them should be prioritized over the others. + * + * @hide + */ + public static final int ZYGOTE_POLICY_FLAG_SYSTEM_PROCESS = 1 << 2; + + /** * State associated with the zygote process. * @hide */ @@ -525,6 +559,7 @@ 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 zygotePolicyFlags Flags used to determine how to launch the application * @param isTopApp whether the process starts for high priority application. * @param disabledCompatChanges null-ok list of disabled compat changes for the process being * started. @@ -546,13 +581,14 @@ public class Process { @Nullable String appDataDir, @Nullable String invokeWith, @Nullable String packageName, + int zygotePolicyFlags, boolean isTopApp, @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, isTopApp, disabledCompatChanges, zygoteArgs); + zygotePolicyFlags, isTopApp, disabledCompatChanges, zygoteArgs); } /** @hide */ @@ -573,7 +609,8 @@ public class Process { return WebViewZygote.getProcess().start(processClass, niceName, uid, gid, gids, runtimeFlags, mountExternal, targetSdkVersion, seInfo, abi, instructionSet, appDataDir, invokeWith, packageName, - /*useUsapPool=*/ false, /*isTopApp=*/ false, disabledCompatChanges, zygoteArgs); + /*zygotePolicyFlags=*/ ZYGOTE_POLICY_FLAG_EMPTY, /*isTopApp=*/ false, + disabledCompatChanges, zygoteArgs); } /** |
