am 0efe6490: am 119a8025: Merge "Move mirror::ArtMethod to native"

* commit '0efe64909fe9e1162079d7091078da13f51da6da':
  Move mirror::ArtMethod to native
diff --git a/runtime/native/java_lang_reflect_Constructor.cc b/runtime/native/java_lang_reflect_Constructor.cc
index 93ba84a..9db47d8 100644
--- a/runtime/native/java_lang_reflect_Constructor.cc
+++ b/runtime/native/java_lang_reflect_Constructor.cc
@@ -50,10 +50,17 @@
     // If caller is null, then we called from JNI, just avoid the check since JNI avoids most
     // access checks anyways. TODO: Investigate if this the correct behavior.
     if (caller != nullptr && !caller->CanAccess(c.Get())) {
-      soa.Self()->ThrowNewExceptionF(
-          "Ljava/lang/IllegalAccessException;", "%s is not accessible from %s",
-          PrettyClass(c.Get()).c_str(), PrettyClass(caller).c_str());
-      return nullptr;
+      if (PrettyDescriptor(c.Get()) == "dalvik.system.DexPathList$Element") {
+        // b/20699073.
+        LOG(WARNING) << "The dalvik.system.DexPathList$Element constructor is not accessible by "
+                        "default. This is a temporary workaround for backwards compatibility "
+                        "with class-loader hacks. Please update your application.";
+      } else {
+        soa.Self()->ThrowNewExceptionF(
+            "Ljava/lang/IllegalAccessException;", "%s is not accessible from %s",
+            PrettyClass(c.Get()).c_str(), PrettyClass(caller).c_str());
+        return nullptr;
+      }
     }
   }
   if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(soa.Self(), c, true, true)) {