summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Jastrzebski <haaawk@google.com>2015-02-16 13:06:08 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-16 13:06:08 +0000
commitcc34625cb76b7a4b551c1460a4f998032825410b (patch)
treeb4c8208d6c1919b6494e49a3ef0255a463bf6622
parentf6901eb9e277491c9b3dc1fcc5b1f18b1a569ae3 (diff)
parent07aaff33ef0e61dfbb15188c5aae0624dc9524a9 (diff)
downloadframeworks_base-cc34625cb76b7a4b551c1460a4f998032825410b.zip
frameworks_base-cc34625cb76b7a4b551c1460a4f998032825410b.tar.gz
frameworks_base-cc34625cb76b7a4b551c1460a4f998032825410b.tar.bz2
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.
-rw-r--r--core/java/com/android/internal/os/RuntimeInit.java5
-rw-r--r--core/java/com/android/internal/os/ZygoteInit.java1
2 files changed, 4 insertions, 2 deletions
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 class RuntimeInit {
}
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 @@ public class RuntimeInit {
}
/**
- * 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 class ZygoteInit {
public static void main(String argv[]) {
try {
+ RuntimeInit.enableDdms();
// Start profiling the zygote initialization.
SamplingProfilerIntegration.start();