diff options
author | Alex Light <allight@google.com> | 2019-04-09 20:03:02 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-04-09 20:03:02 +0000 |
commit | 1149338ad78d1c864d691d04d7d7bc1546a709c5 (patch) | |
tree | e54440be7565bf63295a3bf5846c026ef33c6283 | |
parent | fb9d0a5203df91cd02bc3a1da6b72ed23190a9b9 (diff) | |
parent | 73befcf4495616129ce484e5124e05b85277192e (diff) | |
download | extras-1149338ad78d1c864d691d04d7d7bc1546a709c5.tar.gz |
Merge "Change warning logic in preopt2cachename"android-q-preview-6android-q-preview-5android-q-preview-4android-q-preview-2.5
-rw-r--r-- | preopt2cachename/preopt2cachename.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/preopt2cachename/preopt2cachename.cpp b/preopt2cachename/preopt2cachename.cpp index 40d66b14..c4444418 100644 --- a/preopt2cachename/preopt2cachename.cpp +++ b/preopt2cachename/preopt2cachename.cpp @@ -28,16 +28,16 @@ static const char* kOdexCacheSuffix = "@classes.dex"; static const char* kVdexCacheSuffix = "@classes.vdex"; static const char* kArtCacheSuffix = "@classes.art"; -// Returns the ISA extracted from the file_location. -// file_location is formatted like /system/app/<app_name>/oat/<isa>/<app_name>.{odex,vdex} -// for all functions. We return an empty string "" in error cases. +// Returns the ISA extracted from the file_location. file_location is formatted like +// /system{/product,}/{priv-,}app/<app_name>/oat/<isa>/<app_name>.{odex,vdex} for all functions. We +// return an empty string "" in error cases. static std::string ExtractISA(const std::string& file_location) { std::vector<std::string> split_file_location = android::base::Split(file_location, "/"); if (split_file_location.size() <= 1) { return ""; - } else if (split_file_location.size() != 7) { - LOG(WARNING) << "Unexpected length for file-location. We expected 7 segments but found " - << split_file_location.size(); + } else if (split_file_location.size() != 7 && split_file_location.size() != 8) { + LOG(WARNING) << "Unexpected length for file-location. We expected 7 or 8 segments but found " + << split_file_location.size() << " for " << file_location; } return split_file_location[split_file_location.size() - 2]; } |