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

Bug: 10614658
Change-Id: I9156dfca78ac8cd1c62fb258825cc791629270a4
diff --git a/runtime/utils.h b/runtime/utils.h
index c506fba..812a581 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -353,11 +353,10 @@
 // Returns the dalvik-cache location for a DexFile or OatFile, or dies trying.
 std::string GetDalvikCacheFilenameOrDie(const std::string& location);
 
-// Check whether the given filename has a valid extension
-bool IsValidZipFilename(const std::string& filename);
-bool IsValidDexFilename(const std::string& filename);
-bool IsValidImageFilename(const std::string& filename);
-bool IsValidOatFilename(const std::string& filename);
+// Check whether the given magic matches a known file type.
+bool IsZipMagic(uint32_t magic);
+bool IsDexMagic(uint32_t magic);
+bool IsOatMagic(uint32_t magic);
 
 class VoidFunctor {
  public: