diff options
author | Pierre Lecesne <lecesne@google.com> | 2017-11-27 19:29:42 +0000 |
---|---|---|
committer | Pierre Lecesne <lecesne@google.com> | 2017-11-27 19:33:47 +0000 |
commit | 70fdf76c52224217179529be868c47b3194f1551 (patch) | |
tree | 9ca3710214c5e292136989e0332681a293b1cc46 /tools/aapt2/ResourceUtils.cpp | |
parent | 15176cd986b0970c636036f60e97d5be53f3ce91 (diff) |
AAPT2 - Make raw files of type unknown.
Bug: 69791607
Test: Manual.
Change-Id: I6ee5ef37fb447ab79d46b57e0dc4eaad84eec723
Diffstat (limited to 'tools/aapt2/ResourceUtils.cpp')
-rw-r--r-- | tools/aapt2/ResourceUtils.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp index 24187d96fec5..02ac86c94b46 100644 --- a/tools/aapt2/ResourceUtils.cpp +++ b/tools/aapt2/ResourceUtils.cpp @@ -707,7 +707,9 @@ std::unique_ptr<Item> ParseBinaryResValue(const ResourceType& type, const Config std::unique_ptr<FileReference> file_ref = util::make_unique<FileReference>(dst_pool->MakeRef( str, StringPool::Context(StringPool::Context::kHighPriority, config))); - if (util::EndsWith(*file_ref->path, ".xml")) { + if (type == ResourceType::kRaw) { + file_ref->type = ResourceFile::Type::kUnknown; + } else if (util::EndsWith(*file_ref->path, ".xml")) { file_ref->type = ResourceFile::Type::kBinaryXml; } else if (util::EndsWith(*file_ref->path, ".png")) { file_ref->type = ResourceFile::Type::kPng; |