am 07aaff33: am 58524b2a: am e7e92381: Merge "Register DDM handlers at the beginning of main method."
* commit '07aaff33ef0e61dfbb15188c5aae0624dc9524a9':
Register DDM handlers at the beginning of main method.
diff --git a/core/java/com/android/internal/os/RuntimeInit.java b/core/java/com/android/internal/os/RuntimeInit.java
index 29ccb6a..2539a35 100644
--- a/core/java/com/android/internal/os/RuntimeInit.java
+++ b/core/java/com/android/internal/os/RuntimeInit.java
@@ -233,6 +233,7 @@
}
public static final void main(String[] argv) {
+ enableDdms();
if (argv.length == 2 && argv[1].equals("application")) {
if (DEBUG) Slog.d(TAG, "RuntimeInit: Starting application");
redirectLogStreams();
@@ -365,9 +366,9 @@
}
/**
- * Enable debugging features.
+ * Enable DDMS.
*/
- static {
+ static final void enableDdms() {
// Register handlers for DDM messages.
android.ddm.DdmRegister.registerHandlers();
}
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 2477d94..035b017 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -557,6 +557,7 @@
public static void main(String argv[]) {
try {
+ RuntimeInit.enableDdms();
// Start profiling the zygote initialization.
SamplingProfilerIntegration.start();