summaryrefslogtreecommitdiffstats
path: root/runtime/dex_file.h
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-10-04 12:00:22 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-04 12:00:22 -0700
commit1449f1dbd4174c8bee5a3a1dbdbc256216342fce (patch)
treef7d620c48a52a08bc3f2a9da5abe4e5941b852e2 /runtime/dex_file.h
parenta9650dd5e7195aec987a69a6ebbdaf33f73a6b00 (diff)
parent80f85137828f3ada45de7beb0acd2888ed7b3b24 (diff)
downloadart-1449f1dbd4174c8bee5a3a1dbdbc256216342fce.zip
art-1449f1dbd4174c8bee5a3a1dbdbc256216342fce.tar.gz
art-1449f1dbd4174c8bee5a3a1dbdbc256216342fce.tar.bz2
am 80f85137: am 7c798419: am 7c3d13ae: Use file magic to determine file type, not file extension.
* commit '80f85137828f3ada45de7beb0acd2888ed7b3b24': Use file magic to determine file type, not file extension.
Diffstat (limited to 'runtime/dex_file.h')
-rw-r--r--runtime/dex_file.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 40e4c72..7f92f49 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -348,7 +348,7 @@ class DexFile {
// For .dex files, this is the header checksum.
// For zip files, this is the classes.dex zip entry CRC32 checksum.
// Return true if the checksum could be found, false otherwise.
- static bool GetChecksum(const std::string& filename, uint32_t& checksum)
+ static bool GetChecksum(const std::string& filename, uint32_t* checksum)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// Opens .dex file, guessing the container format based on file extension
@@ -818,13 +818,12 @@ class DexFile {
private:
// Opens a .dex file
- static const DexFile* OpenFile(const std::string& filename,
+ static const DexFile* OpenFile(int fd,
const std::string& location,
bool verify);
// Opens a dex file from within a .jar, .zip, or .apk file
- static const DexFile* OpenZip(const std::string& filename,
- const std::string& location);
+ static const DexFile* OpenZip(int fd, const std::string& location);
// Opens a .dex file at the given address backed by a MemMap
static const DexFile* OpenMemory(const std::string& location,