summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mythri Alle <mythria@google.com> 2022-09-14 09:57:03 +0000
committer Mythri Alle <mythria@google.com> 2022-09-14 09:57:03 +0000
commit50c258ca377f7a1e5494583d0e24e895e431bd1e (patch)
tree6a666686fd94d04ed0a9f90c44a20a27b369b6a9
parent1b989de3d7fd2e263fd9d3255549272ce5c78d17 (diff)
Revert "Don't enable jdwp by default on userdebug builds"
This reverts commit 1b989de3d7fd2e263fd9d3255549272ce5c78d17. Reason for revert: Test failures: https://b.corp.google.com/issues/246707198 https://buganizer.corp.google.com/issues/246616689 Change-Id: Ibeb5a92bcfe129df01f94bec2a41fea57303e53e
-rw-r--r--core/java/com/android/internal/os/Zygote.java16
1 files changed, 4 insertions, 12 deletions
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index ea5f0b2f2144..b1e7d15cbf4a 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -1001,24 +1001,16 @@ public final class Zygote {
}
/**
- * This will enable jdwp by default for all apps. It is OK to cache this property
- * because we expect to reboot the system whenever this property changes
- */
- private static final boolean ENABLE_JDWP = SystemProperties.get(
- "persist.debuggable.dalvik.vm.jdwp.enabled").equals("1");
-
- /**
* Applies debugger system properties to the zygote arguments.
*
- * For eng builds all apps are debuggable. On userdebug and user builds
- * if persist.debuggable.dalvik.vm.jdwp.enabled is 1 all apps are
- * debuggable. Otherwise, the debugger state is specified via the
- * "--enable-jdwp" flag in the spawn request.
+ * If "ro.debuggable" is "1", all apps are debuggable. Otherwise,
+ * the debugger state is specified via the "--enable-jdwp" flag
+ * in the spawn request.
*
* @param args non-null; zygote spawner args
*/
static void applyDebuggerSystemProperty(ZygoteArguments args) {
- if (Build.IS_ENG || ENABLE_JDWP) {
+ if (RoSystemProperties.DEBUGGABLE) {
args.mRuntimeFlags |= Zygote.DEBUG_ENABLE_JDWP;
}
}