Package dalvik.system

Class ZygoteHooks


  • public final class ZygoteHooks
    extends Object
    Provides hooks for the zygote to call back into the runtime to perform parent or child specific initialization..
    • Constructor Detail

      • ZygoteHooks

        public ZygoteHooks()
    • Method Detail

      • preFork

        public void preFork()
        Called by the zygote prior to every fork. Each call to preFork is followed by a matching call to postForkChild(int, String) on the child process and postForkCommon() on both the parent and the child process. postForkCommon is called after postForkChild in the child process.
      • postForkChild

        public void postForkChild​(int debugFlags,
                                  String instructionSet)
        Called by the zygote in the child process after every fork. The debug flags from debugFlags are applied to the child process. The string instructionSet determines whether to use a native bridge.
      • postForkCommon

        public void postForkCommon()
        Called by the zygote in both the parent and child processes after every fork. In the child process, this method is called after postForkChild.