diff options
-rw-r--r-- | dalvik/src/main/java/dalvik/system/ZygoteHooks.java | 14 | ||||
-rw-r--r-- | mmodules/core_platform_api/api/platform/current-api.txt | 9 |
2 files changed, 11 insertions, 12 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(); } diff --git a/mmodules/core_platform_api/api/platform/current-api.txt b/mmodules/core_platform_api/api/platform/current-api.txt index d2ecf2976b..5a3c59ca88 100644 --- a/mmodules/core_platform_api/api/platform/current-api.txt +++ b/mmodules/core_platform_api/api/platform/current-api.txt @@ -795,14 +795,13 @@ package dalvik.system { } public final class ZygoteHooks { - ctor public ZygoteHooks(); method public static void gcAndFinalize(); method public static void onBeginPreload(); method public static void onEndPreload(); - method public void postForkChild(int, boolean, boolean, String); - method public void postForkCommon(); - method public void postForkSystemServer(); - method public void preFork(); + method public static void postForkChild(int, boolean, boolean, String); + method public static void postForkCommon(); + method public static void postForkSystemServer(); + method public static void preFork(); method public static void startZygoteNoThreadCreation(); method public static void stopZygoteNoThreadCreation(); } |