Merge "Register DDM handlers at the beginning of main method."
This commit is contained in:
@@ -233,6 +233,7 @@ public class RuntimeInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final void main(String[] argv) {
|
public static final void main(String[] argv) {
|
||||||
|
enableDdms();
|
||||||
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();
|
||||||
@@ -365,9 +366,9 @@ public class RuntimeInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable debugging features.
|
* Enable DDMS.
|
||||||
*/
|
*/
|
||||||
static {
|
static final void enableDdms() {
|
||||||
// Register handlers for DDM messages.
|
// Register handlers for DDM messages.
|
||||||
android.ddm.DdmRegister.registerHandlers();
|
android.ddm.DdmRegister.registerHandlers();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -557,6 +557,7 @@ public class ZygoteInit {
|
|||||||
|
|
||||||
public static void main(String argv[]) {
|
public static void main(String argv[]) {
|
||||||
try {
|
try {
|
||||||
|
RuntimeInit.enableDdms();
|
||||||
// Start profiling the zygote initialization.
|
// Start profiling the zygote initialization.
|
||||||
SamplingProfilerIntegration.start();
|
SamplingProfilerIntegration.start();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user