diff options
author | Richard Uhler <ruhler@google.com> | 2015-06-25 15:21:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-25 15:21:13 +0000 |
commit | 9ae03f09f33c64b6589e85faeac4142b80531b10 (patch) | |
tree | 1269e5863e94ea0f86c2c7aa05a282f1782c2ed8 /runtime/oat_file_assistant.h | |
parent | 92067896c6583d59171dbee9c720a316d63be177 (diff) | |
parent | cb44b11a926696e34b3dc44288e762b4303cc128 (diff) | |
download | art-9ae03f09f33c64b6589e85faeac4142b80531b10.zip art-9ae03f09f33c64b6589e85faeac4142b80531b10.tar.gz art-9ae03f09f33c64b6589e85faeac4142b80531b10.tar.bz2 |
Merge "Do not try to compile resource-only dex files." into mnc-dev
Diffstat (limited to 'runtime/oat_file_assistant.h')
-rw-r--r-- | runtime/oat_file_assistant.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/runtime/oat_file_assistant.h b/runtime/oat_file_assistant.h index 4c0b0e2..7216fc7 100644 --- a/runtime/oat_file_assistant.h +++ b/runtime/oat_file_assistant.h @@ -174,6 +174,12 @@ class OatFileAssistant { static std::vector<std::unique_ptr<const DexFile>> LoadDexFiles( const OatFile& oat_file, const char* dex_location); + // Returns true if there are dex files in the original dex location that can + // be compiled with dex2oat for this dex location. + // Returns false if there is no original dex file, or if the original dex + // file is an apk/zip without a classes.dex entry. + bool HasOriginalDexFiles(); + // If the dex file has been installed with a compiled oat file alongside // it, the compiled oat file will have the extension .odex, and is referred // to as the odex file. It is called odex for legacy reasons; the file is @@ -312,6 +318,8 @@ class OatFileAssistant { // Returns dex_checksum if a required checksum was located. Returns // null if the required checksum was not found. // The caller shouldn't clean up or free the returned pointer. + // This sets the has_original_dex_files_ field to true if a checksum was + // found for the dex_location_ dex file. const uint32_t* GetRequiredDexChecksum(); // Returns the loaded odex file. @@ -374,9 +382,10 @@ class OatFileAssistant { // Cached value of the required dex checksum. // This should be accessed only by the GetRequiredDexChecksum() method. - uint32_t cached_required_dex_checksum; - bool required_dex_checksum_attempted = false; - bool required_dex_checksum_found; + uint32_t cached_required_dex_checksum_; + bool required_dex_checksum_attempted_ = false; + bool required_dex_checksum_found_; + bool has_original_dex_files_; // Cached value of the odex file name. // This should be accessed only by the OdexFileName() method. |