summaryrefslogtreecommitdiff
path: root/runtime/dex_file.h
diff options
context:
space:
mode:
author Sebastien Hertz <shertz@google.com> 2015-04-30 07:34:27 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-04-30 07:34:27 +0000
commitaf6535b39fb8630e02cd38ca594dec1d65be90cd (patch)
tree85363c8b4d677ab20b7dcb61345483c2feac47d1 /runtime/dex_file.h
parentde8e618e3c4b9ad5437772136ba30e49c3c95781 (diff)
parentf94b250f426c7f43f9ee78e39e07d6ee13842b20 (diff)
am f94b250f: am 0a50264b: Merge "ART: Allow oat files with duplicates classes in corner case"
* commit 'f94b250f426c7f43f9ee78e39e07d6ee13842b20': ART: Allow oat files with duplicates classes in corner case
Diffstat (limited to 'runtime/dex_file.h')
-rw-r--r--runtime/dex_file.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 6b3f883a5d..84eaa4a73e 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -388,6 +388,10 @@ class DexFile {
static bool Open(const char* filename, const char* location, std::string* error_msg,
std::vector<std::unique_ptr<const DexFile>>* dex_files);
+ // Checks whether the given file has the dex magic, or is a zip file with a classes.dex entry.
+ // If this function returns false, Open will not succeed. The inverse is not true, however.
+ static bool MaybeDex(const char* filename);
+
// Opens .dex file, backed by existing memory
static std::unique_ptr<const DexFile> Open(const uint8_t* base, size_t size,
const std::string& location,