Loading core/java/com/android/internal/os/Zygote.java +4 −12 Original line number Original line Diff line number Diff line Loading @@ -1000,25 +1000,17 @@ 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. * Applies debugger system properties to the zygote arguments. * * * For eng builds all apps are debuggable. On userdebug and user builds * If "ro.debuggable" is "1", all apps are debuggable. Otherwise, * if persist.debuggable.dalvik.vm.jdwp.enabled is 1 all apps are * the debugger state is specified via the "--enable-jdwp" flag * debuggable. Otherwise, the debugger state is specified via the * in the spawn request. * "--enable-jdwp" flag in the spawn request. * * * @param args non-null; zygote spawner args * @param args non-null; zygote spawner args */ */ static void applyDebuggerSystemProperty(ZygoteArguments args) { static void applyDebuggerSystemProperty(ZygoteArguments args) { if (Build.IS_ENG || ENABLE_JDWP) { if (RoSystemProperties.DEBUGGABLE) { args.mRuntimeFlags |= Zygote.DEBUG_ENABLE_JDWP; args.mRuntimeFlags |= Zygote.DEBUG_ENABLE_JDWP; } } } } Loading Loading
core/java/com/android/internal/os/Zygote.java +4 −12 Original line number Original line Diff line number Diff line Loading @@ -1000,25 +1000,17 @@ 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. * Applies debugger system properties to the zygote arguments. * * * For eng builds all apps are debuggable. On userdebug and user builds * If "ro.debuggable" is "1", all apps are debuggable. Otherwise, * if persist.debuggable.dalvik.vm.jdwp.enabled is 1 all apps are * the debugger state is specified via the "--enable-jdwp" flag * debuggable. Otherwise, the debugger state is specified via the * in the spawn request. * "--enable-jdwp" flag in the spawn request. * * * @param args non-null; zygote spawner args * @param args non-null; zygote spawner args */ */ static void applyDebuggerSystemProperty(ZygoteArguments args) { static void applyDebuggerSystemProperty(ZygoteArguments args) { if (Build.IS_ENG || ENABLE_JDWP) { if (RoSystemProperties.DEBUGGABLE) { args.mRuntimeFlags |= Zygote.DEBUG_ENABLE_JDWP; args.mRuntimeFlags |= Zygote.DEBUG_ENABLE_JDWP; } } } } Loading