summaryrefslogtreecommitdiff
path: root/tools/aapt2/optimize/ResourcePathShortener.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt2/optimize/ResourcePathShortener.cpp')
-rw-r--r--tools/aapt2/optimize/ResourcePathShortener.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/aapt2/optimize/ResourcePathShortener.cpp b/tools/aapt2/optimize/ResourcePathShortener.cpp
index 845262bcb0d9..6b11de759d2d 100644
--- a/tools/aapt2/optimize/ResourcePathShortener.cpp
+++ b/tools/aapt2/optimize/ResourcePathShortener.cpp
@@ -23,6 +23,7 @@
#include "ResourceTable.h"
#include "ValueVisitor.h"
+#include "util/Util.h"
static const std::string base64_chars =
@@ -95,8 +96,8 @@ bool ResourcePathShortener::Consume(IAaptContext* context, ResourceTable* table)
android::StringPiece res_subdir, actual_filename, extension;
util::ExtractResFilePathParts(*file_ref->path, &res_subdir, &actual_filename, &extension);
- // Android detects ColorStateLists via pathname, skip res/color/*
- if (res_subdir == android::StringPiece("res/color/"))
+ // Android detects ColorStateLists via pathname, skip res/color*
+ if (util::StartsWith(res_subdir, "res/color"))
continue;
std::string shortened_filename = ShortenFileName(*file_ref->path, num_chars);