summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2018-01-31 20:17:19 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-01-31 20:17:19 +0000
commit3b50dc3d34fc486b64006f15bad75dbe3ccda229 (patch)
treebfe4c642e4e1ea5dd14a3f7144b4a96d3018d8a7
parent880839d2d10d0a3468a29b9ea20007159f014444 (diff)
parentc50928b763c2e580bf313436ff641fd5a5a83cb0 (diff)
Merge "Revert "Revert "Make AndroidRuntime only start the debugger for zygote forked apps."""
-rw-r--r--core/jni/AndroidRuntime.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index d7f725d03edf..3784d4daa2e9 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -761,18 +761,17 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
/*
* Enable debugging only for apps forked from zygote.
- * Set suspend=y to pause during VM init and use android ADB transport.
*/
if (zygote) {
+ // Set the JDWP provider and required arguments. By default let the runtime choose how JDWP is
+ // implemented. When this is not set the runtime defaults to not allowing JDWP.
addOption("-XjdwpOptions:suspend=n,server=y");
+ parseRuntimeOption("dalvik.vm.jdwp-provider",
+ jdwpProviderBuf,
+ "-XjdwpProvider:",
+ "default");
}
- // Set the JDWP provider. By default let the runtime choose.
- parseRuntimeOption("dalvik.vm.jdwp-provider",
- jdwpProviderBuf,
- "-XjdwpProvider:",
- "default");
-
parseRuntimeOption("dalvik.vm.lockprof.threshold",
lockProfThresholdBuf,
"-Xlockprofthreshold:");