Merge "Introduce ZygoteInit.preForkInit()." am: 52efd46075 am: 4edffff80a
am: 023ae56991
Change-Id: I4f6fcc59933e31f0c99d10a5da83aa8c66e5fc3a
This commit is contained in:
@@ -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
|
@UnsupportedAppUsage
|
||||||
protected static final void commonInit() {
|
protected static final void commonInit() {
|
||||||
if (DEBUG) Slog.d(TAG, "Entered RuntimeInit!");
|
if (DEBUG) Slog.d(TAG, "Entered RuntimeInit!");
|
||||||
@@ -324,7 +333,7 @@ public class RuntimeInit {
|
|||||||
|
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
public static final void main(String[] argv) {
|
public static final void main(String[] argv) {
|
||||||
enableDdms();
|
preForkInit();
|
||||||
if (argv.length == 2 && argv[1].equals("application")) {
|
if (argv.length == 2 && argv[1].equals("application")) {
|
||||||
if (DEBUG) Slog.d(TAG, "RuntimeInit: Starting application");
|
if (DEBUG) Slog.d(TAG, "RuntimeInit: Starting application");
|
||||||
redirectLogStreams();
|
redirectLogStreams();
|
||||||
@@ -418,7 +427,7 @@ public class RuntimeInit {
|
|||||||
/**
|
/**
|
||||||
* Enable DDMS.
|
* Enable DDMS.
|
||||||
*/
|
*/
|
||||||
static final void enableDdms() {
|
private static void enableDdms() {
|
||||||
// Register handlers for DDM messages.
|
// Register handlers for DDM messages.
|
||||||
android.ddm.DdmRegister.registerHandlers();
|
android.ddm.DdmRegister.registerHandlers();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -835,7 +835,7 @@ public class ZygoteInit {
|
|||||||
TimingsTraceLog bootTimingsTraceLog = new TimingsTraceLog(bootTimeTag,
|
TimingsTraceLog bootTimingsTraceLog = new TimingsTraceLog(bootTimeTag,
|
||||||
Trace.TRACE_TAG_DALVIK);
|
Trace.TRACE_TAG_DALVIK);
|
||||||
bootTimingsTraceLog.traceBegin("ZygoteInit");
|
bootTimingsTraceLog.traceBegin("ZygoteInit");
|
||||||
RuntimeInit.enableDdms();
|
RuntimeInit.preForkInit();
|
||||||
|
|
||||||
boolean startSystemServer = false;
|
boolean startSystemServer = false;
|
||||||
String zygoteSocketName = "zygote";
|
String zygoteSocketName = "zygote";
|
||||||
|
|||||||
Reference in New Issue
Block a user