Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40e793c8 authored by Mythri Alle's avatar Mythri Alle Committed by Automerger Merge Worker
Browse files

Merge "Revert "Don't enable jdwp by default on userdebug builds"" am:...

Merge "Revert "Don't enable jdwp by default on userdebug builds"" am: e6a7509d am: a9cc544d am: 7d4c0fec am: 38333df0 am: 9b60a6d1

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2216445



Change-Id: I1360a4a173047de833c28498c6cd964fc6295673
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7821e79a 9b60a6d1
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -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.
     *
     * 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;
        }
    }