summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-04-10 03:09:22 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-04-10 03:09:22 +0000
commit1232c3619b45c41cae201ae27b85eb0712fa6e3d (patch)
tree1de3acc7de7bd670946ce7c33e74e4e1658f203c
parent37c5b43c5b31d52215aa5b175033598ff90ed6d0 (diff)
parentc3728ab933091558d3ba1cbdd78c8120849ebfdc (diff)
downloadextras-1232c3619b45c41cae201ae27b85eb0712fa6e3d.tar.gz
Snap for 5452883 from c3728ab933091558d3ba1cbdd78c8120849ebfdc to qt-release
Change-Id: Ia95b06b5ff1d4fe6351ef94cc5c8bb755905672d
-rw-r--r--preopt2cachename/preopt2cachename.cpp12
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];
}