summaryrefslogtreecommitdiffstats
path: root/runtime/dex_file.h
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-09-04 17:15:11 -0700
committerBrian Carlstrom <bdc@google.com>2013-10-03 17:00:39 -0700
commit7c3d13aebdd8611cae58a1048bffb13cbdc465cb (patch)
tree23f2415bb38e77b0d53c1de06c37a133c7b08e51 /runtime/dex_file.h
parentf15242943a7a836966cd521e3095a4b731695c71 (diff)
downloadandroid_art-7c3d13aebdd8611cae58a1048bffb13cbdc465cb.tar.gz
android_art-7c3d13aebdd8611cae58a1048bffb13cbdc465cb.tar.bz2
android_art-7c3d13aebdd8611cae58a1048bffb13cbdc465cb.zip
Use file magic to determine file type, not file extension.
Bug: 10614658 Change-Id: I9156dfca78ac8cd1c62fb258825cc791629270a4
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 7be5cb848f..346154cc89 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -346,7 +346,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
@@ -815,13 +815,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,