Don't enable JNI work arounds with check JNI

Change-Id: I310b363126a4436163208ff618a6285061133a17
diff --git a/src/dalvik_system_VMRuntime.cc b/src/dalvik_system_VMRuntime.cc
index 10732db..df12658 100644
--- a/src/dalvik_system_VMRuntime.cc
+++ b/src/dalvik_system_VMRuntime.cc
@@ -126,9 +126,12 @@
   // Note that targetSdkVersion may be 0, meaning "current".
   if (targetSdkVersion > 0 && targetSdkVersion <= 13 /* honeycomb-mr2 */) {
     JNIEnvExt* env_ext = reinterpret_cast<JNIEnvExt*>(env);
-    // TODO: running with CheckJNI should override this and force you to obey the strictest rules.
-    LOG(INFO) << "Turning on JNI app bug workarounds for target SDK version " << targetSdkVersion << "...";
-    env_ext->vm->work_around_app_jni_bugs = true;
+    // running with CheckJNI forces you to obey the strictest rules.
+    if (!env_ext->check_jni) {
+      LOG(INFO) << "Turning on JNI app bug workarounds for target SDK version "
+          << targetSdkVersion << "...";
+      env_ext->vm->work_around_app_jni_bugs = true;
+    }
   }
 }