Add back the work-arounds for broken apps that assume JNI uses direct references.
Note that we'll need to add support for this to jni_compiler too.
Change-Id: I7e31ab4314ba913cde4629544addd0aad9a89b3b
diff --git a/src/thread.cc b/src/thread.cc
index c90c745..9d2862d 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -299,7 +299,7 @@
// Check if this is a local reference in the SIRT
if (SirtContains(obj)) {
result = *reinterpret_cast<Object**>(obj); // Read from SIRT
- } else if (false /*gDvmJni.workAroundAppJniBugs*/) { // TODO
+ } else if (jni_env_->work_around_app_jni_bugs) {
// Assume an invalid local reference is actually a direct pointer.
result = reinterpret_cast<Object*>(obj);
} else {