Revert "Revert "Fix ArtMethod::GetInvokeType for static methods on interfaces.""

bug:29089267
bug:27521545

We were hitting a compiler DCHECK that a class would never require to
do access checks on itself. The reason was that the compiler driver
was not trying to resolve a type, but instead relied on the verifier
for pre-populating the dex cache. However, the verifier doesn't
necessarily run in JIT mode.

This reverts commit 12abcbd950bd0ff4528e2e0d27ca5e881c7b0467.

Change-Id: I59204c16927084f6605a2a3f999ca529f949e1ad
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index 1790df6..f86cb13 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -79,10 +79,10 @@
 
 InvokeType ArtMethod::GetInvokeType() {
   // TODO: kSuper?
-  if (GetDeclaringClass()->IsInterface()) {
-    return kInterface;
-  } else if (IsStatic()) {
+  if (IsStatic()) {
     return kStatic;
+  } else if (GetDeclaringClass()->IsInterface()) {
+    return kInterface;
   } else if (IsDirect()) {
     return kDirect;
   } else {