Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4edffff8 authored by Tobias Thierer's avatar Tobias Thierer Committed by android-build-merger
Browse files

Merge "Introduce ZygoteInit.preForkInit()."

am: 52efd460

Change-Id: I5bc25ca924624283126a584917f5adb6ff6eed03
parents 2f9d682e 52efd460
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -192,6 +192,15 @@ public class RuntimeInit {
        }
    }

    /**
     * Common initialization that (unlike {@link #commonInit()} should happen prior to
     * the Zygote fork.
     */
    public static void preForkInit() {
        if (DEBUG) Slog.d(TAG, "Entered preForkInit.");
        RuntimeInit.enableDdms();
    }

    @UnsupportedAppUsage
    protected static final void commonInit() {
        if (DEBUG) Slog.d(TAG, "Entered RuntimeInit!");
@@ -324,7 +333,7 @@ public class RuntimeInit {

    @UnsupportedAppUsage
    public static final void main(String[] argv) {
        enableDdms();
        preForkInit();
        if (argv.length == 2 && argv[1].equals("application")) {
            if (DEBUG) Slog.d(TAG, "RuntimeInit: Starting application");
            redirectLogStreams();
@@ -418,7 +427,7 @@ public class RuntimeInit {
    /**
     * Enable DDMS.
     */
    static final void enableDdms() {
    private static void enableDdms() {
        // Register handlers for DDM messages.
        android.ddm.DdmRegister.registerHandlers();
    }
+1 −1
Original line number Diff line number Diff line
@@ -835,7 +835,7 @@ public class ZygoteInit {
            TimingsTraceLog bootTimingsTraceLog = new TimingsTraceLog(bootTimeTag,
                    Trace.TRACE_TAG_DALVIK);
            bootTimingsTraceLog.traceBegin("ZygoteInit");
            RuntimeInit.enableDdms();
            RuntimeInit.preForkInit();

            boolean startSystemServer = false;
            String zygoteSocketName = "zygote";