diff options
author | Neil Fuller <nfuller@google.com> | 2019-01-28 18:34:27 +0000 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2019-01-29 19:47:55 +0000 |
commit | 54d244d3ee96e2747b3217f10226deff6f65505c (patch) | |
tree | 488eab1ec81307a32cfba2fc27e6abda0f8ac6a5 /dalvik | |
parent | 51588c82bd37ed5bf7e5c7c1518ecc1d0c712c2f (diff) |
Make the ZygoteHooks API more consistent
Make the ZygoteHooks API more consistent by making the API
entirely "static".
Bug: 111742291
Test: build / boot / treehugger
Merged-In: Ide38a9640a4d9f7a7621b8405a9732573f7420cf
Change-Id: Ide38a9640a4d9f7a7621b8405a9732573f7420cf
Diffstat (limited to 'dalvik')
-rw-r--r-- | dalvik/src/main/java/dalvik/system/ZygoteHooks.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java index 5ae9f23043..13769e137e 100644 --- a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java +++ b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java @@ -30,10 +30,10 @@ import java.io.File; */ @libcore.api.CorePlatformApi public final class ZygoteHooks { - private long token; + private static long token; - @libcore.api.CorePlatformApi - public ZygoteHooks() { + /** All methods are static, no need to instantiate. */ + private ZygoteHooks() { } /** @@ -101,7 +101,7 @@ public final class ZygoteHooks { * the child process. */ @libcore.api.CorePlatformApi - public void preFork() { + public static void preFork() { Daemons.stop(); token = nativePreFork(); waitUntilAllThreadsStopped(); @@ -112,7 +112,7 @@ public final class ZygoteHooks { * before {@code postForkChild} for system server. */ @libcore.api.CorePlatformApi - public void postForkSystemServer() { + public static void postForkSystemServer() { nativePostForkSystemServer(); } @@ -122,7 +122,7 @@ public final class ZygoteHooks { * {@code instructionSet} determines whether to use a native bridge. */ @libcore.api.CorePlatformApi - public void postForkChild(int runtimeFlags, boolean isSystemServer, boolean isZygote, + public static void postForkChild(int runtimeFlags, boolean isSystemServer, boolean isZygote, String instructionSet) { nativePostForkChild(token, runtimeFlags, isSystemServer, isZygote, instructionSet); @@ -135,7 +135,7 @@ public final class ZygoteHooks { * {@code postForkChild}. */ @libcore.api.CorePlatformApi - public void postForkCommon() { + public static void postForkCommon() { Daemons.startPostZygoteFork(); nativePostZygoteFork(); } |