Use file magic to determine file type, not file extension.

Bug: 10614658
Change-Id: I9156dfca78ac8cd1c62fb258825cc791629270a4
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index d2a6c0e..4c60b8f 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -228,7 +228,7 @@
     } else {
       uint32_t location_checksum;
       // If we have no classes.dex checksum such as in a user build, assume up-to-date.
-      if (!DexFile::GetChecksum(filename.c_str(), location_checksum)) {
+      if (!DexFile::GetChecksum(filename.c_str(), &location_checksum)) {
         if (debug_logging) {
           LOG(INFO) << "DexFile_isDexOptNeeded ignoring precompiled stripped file: "
               << filename.c_str();
@@ -278,7 +278,7 @@
 
   ScopedObjectAccess soa(env);
   uint32_t location_checksum;
-  if (!DexFile::GetChecksum(filename.c_str(), location_checksum)) {
+  if (!DexFile::GetChecksum(filename.c_str(), &location_checksum)) {
     LOG(ERROR) << "DexFile_isDexOptNeeded failed to compute checksum of " << filename.c_str();
     return JNI_TRUE;
   }