Downgrade duplicate method DCHECKs to WARNINGs

These DCHECKs were causing spurious failures when testing with
debug ART. Duplicate methods could cause multiple methods in
a class to have the same name and signature. Overriding these
methods could make it so that methods are owned by the wrong type.
Though the corrupted methods arrays could be a cause for concern 
(hence the DCHECKs) but in the most common case it should be fine
as the duplicated methods cannot be invoked.

As both of these situations can be caused by some versions of
proguard and are present in some released apps, we are downgrading
these to warnings even on Debug builds.

Bug: 32549051
Bug: 32546154
Bug: 36446088

Test: ./test/testrunner/testrunner.py --host -j40
Change-Id: Ib26f30718726a9064056855192cef302f3df1eeb
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 746cace..fa87c8c 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -6732,10 +6732,11 @@
     auto is_same_method = [m] (const ArtMethod& meth) {
       return &meth == m;
     };
-    CHECK((super_vtable_length > i && superclass->GetVTableEntry(i, pointer_size) == m) ||
-          std::find_if(virtuals.begin(), virtuals.end(), is_same_method) != virtuals.end())
-        << m->PrettyMethod() << " does not seem to be owned by current class "
-        << klass->PrettyClass() << " or any of its superclasses!";
+    if (!((super_vtable_length > i && superclass->GetVTableEntry(i, pointer_size) == m) ||
+          std::find_if(virtuals.begin(), virtuals.end(), is_same_method) != virtuals.end())) {
+      LOG(WARNING) << m->PrettyMethod() << " does not seem to be owned by current class "
+                   << klass->PrettyClass() << " or any of its superclasses!";
+    }
   }
 }
 
@@ -6763,14 +6764,15 @@
                                   other_entry->GetAccessFlags())) {
         continue;
       }
-      CHECK(vtable_entry != other_entry &&
-            !name_comparator.HasSameNameAndSignature(
-                other_entry->GetInterfaceMethodIfProxy(pointer_size)))
-          << "vtable entries " << i << " and " << j << " are identical for "
-          << klass->PrettyClass() << " in method " << vtable_entry->PrettyMethod() << " (0x"
-          << std::hex << reinterpret_cast<uintptr_t>(vtable_entry) << ") and "
-          << other_entry->PrettyMethod() << "  (0x" << std::hex
-          << reinterpret_cast<uintptr_t>(other_entry) << ")";
+      if (vtable_entry == other_entry ||
+          name_comparator.HasSameNameAndSignature(
+               other_entry->GetInterfaceMethodIfProxy(pointer_size))) {
+        LOG(WARNING) << "vtable entries " << i << " and " << j << " are identical for "
+                     << klass->PrettyClass() << " in method " << vtable_entry->PrettyMethod()
+                     << " (0x" << std::hex << reinterpret_cast<uintptr_t>(vtable_entry) << ") and "
+                     << other_entry->PrettyMethod() << "  (0x" << std::hex
+                     << reinterpret_cast<uintptr_t>(other_entry) << ")";
+      }
     }
   }
 }