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

Commit 3d2f62fd authored by Orion Hodson's avatar Orion Hodson
Browse files

AndroidRuntime: when CheckJNI is enabled log a message

This matches behaviour described in:
 https://developer.android.com/training/articles/perf-jni#extended-checking

All output from CheckJNI state was disabled as part of quietening
logspam, but now we log a message only if CheckJNI is
enabled. CheckJNI is off by default and only used as a developer
correctness tool.

Bug: N/A
Test: adb root; adb shell stop;                        \
      adb shell setprop dalvik.vm.checkjni 1;          \
      adb shell start; adb logcat -d | grep CheckJNI
Change-Id: I93bc2d097a8769b7768c633b705b29fc1aac634a
parent 999147b4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -746,8 +746,9 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
    }

    const bool checkJni = GetBoolProperty("dalvik.vm.checkjni", false);
    ALOGV("CheckJNI is %s\n", checkJni ? "ON" : "OFF");
    if (checkJni) {
        ALOGD("CheckJNI is ON");

        /* extended JNI checking */
        addOption("-Xcheck:jni");