blob: d5067b1c0fbf39e700cfa47aa68a2fed9ea2d8aa [file] [log] [blame]
Adam Lesinski1ab598f2015-08-14 14:26:04 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "ResourceTable.h"
18#include "ResourceValues.h"
19#include "ValueVisitor.h"
20
21#include "flatten/ChunkWriter.h"
22#include "flatten/ResourceTypeExtensions.h"
23#include "flatten/TableFlattener.h"
24#include "util/BigBuffer.h"
25
Elliott Hughese7d2cc32015-12-08 08:57:14 -080026#include <android-base/macros.h>
Adam Lesinski803c7c82016-04-06 16:09:43 -070027#include <algorithm>
Adam Lesinskid0f116b2016-07-08 15:00:32 -070028#include <sstream>
Adam Lesinski1ab598f2015-08-14 14:26:04 -070029#include <type_traits>
30#include <numeric>
Adam Lesinski1ab598f2015-08-14 14:26:04 -070031
32using namespace android;
33
34namespace aapt {
35
36namespace {
37
38template <typename T>
39static bool cmpIds(const T* a, const T* b) {
40 return a->id.value() < b->id.value();
41}
42
43static void strcpy16_htod(uint16_t* dst, size_t len, const StringPiece16& src) {
44 if (len == 0) {
45 return;
46 }
47
48 size_t i;
49 const char16_t* srcData = src.data();
50 for (i = 0; i < len - 1 && i < src.size(); i++) {
51 dst[i] = util::hostToDevice16((uint16_t) srcData[i]);
52 }
53 dst[i] = 0;
54}
55
Adam Lesinski59e04c62016-02-04 15:59:23 -080056static bool cmpStyleEntries(const Style::Entry& a, const Style::Entry& b) {
57 if (a.key.id) {
58 if (b.key.id) {
59 return a.key.id.value() < b.key.id.value();
60 }
61 return true;
62 } else if (!b.key.id) {
63 return a.key.name.value() < b.key.name.value();
64 }
65 return false;
66}
67
Adam Lesinski1ab598f2015-08-14 14:26:04 -070068struct FlatEntry {
69 ResourceEntry* entry;
70 Value* value;
Adam Lesinski3b4cd942015-10-30 16:31:42 -070071
72 // The entry string pool index to the entry's name.
Adam Lesinski1ab598f2015-08-14 14:26:04 -070073 uint32_t entryKey;
Adam Lesinski1ab598f2015-08-14 14:26:04 -070074};
75
Adam Lesinski59e04c62016-02-04 15:59:23 -080076class MapFlattenVisitor : public RawValueVisitor {
Adam Lesinski9ba47d82015-10-13 11:37:10 -070077public:
Adam Lesinski1ab598f2015-08-14 14:26:04 -070078 using RawValueVisitor::visit;
79
Adam Lesinski59e04c62016-02-04 15:59:23 -080080 MapFlattenVisitor(ResTable_entry_ext* outEntry, BigBuffer* buffer) :
81 mOutEntry(outEntry), mBuffer(buffer) {
Adam Lesinski28cacf02015-11-23 14:22:47 -080082 }
83
Adam Lesinski1ab598f2015-08-14 14:26:04 -070084 void visit(Attribute* attr) override {
85 {
Adam Lesinski5c3464c2016-08-24 16:03:48 -070086 Reference key = Reference(ResourceId(ResTable_map::ATTR_TYPE));
Adam Lesinski1ab598f2015-08-14 14:26:04 -070087 BinaryPrimitive val(Res_value::TYPE_INT_DEC, attr->typeMask);
88 flattenEntry(&key, &val);
89 }
90
Adam Lesinskia5870652015-11-20 15:32:30 -080091 if (attr->minInt != std::numeric_limits<int32_t>::min()) {
Adam Lesinski5c3464c2016-08-24 16:03:48 -070092 Reference key = Reference(ResourceId(ResTable_map::ATTR_MIN));
Adam Lesinskia5870652015-11-20 15:32:30 -080093 BinaryPrimitive val(Res_value::TYPE_INT_DEC, static_cast<uint32_t>(attr->minInt));
94 flattenEntry(&key, &val);
95 }
96
97 if (attr->maxInt != std::numeric_limits<int32_t>::max()) {
Adam Lesinski5c3464c2016-08-24 16:03:48 -070098 Reference key = Reference(ResourceId(ResTable_map::ATTR_MAX));
Adam Lesinskia5870652015-11-20 15:32:30 -080099 BinaryPrimitive val(Res_value::TYPE_INT_DEC, static_cast<uint32_t>(attr->maxInt));
100 flattenEntry(&key, &val);
101 }
102
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700103 for (Attribute::Symbol& s : attr->symbols) {
104 BinaryPrimitive val(Res_value::TYPE_INT_DEC, s.value);
105 flattenEntry(&s.symbol, &val);
106 }
107 }
108
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700109 void visit(Style* style) override {
110 if (style->parent) {
Adam Lesinski59e04c62016-02-04 15:59:23 -0800111 const Reference& parentRef = style->parent.value();
112 assert(parentRef.id && "parent has no ID");
113 mOutEntry->parent.ident = util::hostToDevice32(parentRef.id.value().id);
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700114 }
115
116 // Sort the style.
117 std::sort(style->entries.begin(), style->entries.end(), cmpStyleEntries);
118
119 for (Style::Entry& entry : style->entries) {
120 flattenEntry(&entry.key, entry.value.get());
121 }
122 }
123
124 void visit(Styleable* styleable) override {
125 for (auto& attrRef : styleable->entries) {
126 BinaryPrimitive val(Res_value{});
127 flattenEntry(&attrRef, &val);
128 }
Adam Lesinski59e04c62016-02-04 15:59:23 -0800129
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700130 }
131
132 void visit(Array* array) override {
133 for (auto& item : array->items) {
134 ResTable_map* outEntry = mBuffer->nextBlock<ResTable_map>();
135 flattenValue(item.get(), outEntry);
136 outEntry->value.size = util::hostToDevice16(sizeof(outEntry->value));
137 mEntryCount++;
138 }
139 }
140
141 void visit(Plural* plural) override {
142 const size_t count = plural->values.size();
143 for (size_t i = 0; i < count; i++) {
144 if (!plural->values[i]) {
145 continue;
146 }
147
148 ResourceId q;
149 switch (i) {
150 case Plural::Zero:
151 q.id = android::ResTable_map::ATTR_ZERO;
152 break;
153
154 case Plural::One:
155 q.id = android::ResTable_map::ATTR_ONE;
156 break;
157
158 case Plural::Two:
159 q.id = android::ResTable_map::ATTR_TWO;
160 break;
161
162 case Plural::Few:
163 q.id = android::ResTable_map::ATTR_FEW;
164 break;
165
166 case Plural::Many:
167 q.id = android::ResTable_map::ATTR_MANY;
168 break;
169
170 case Plural::Other:
171 q.id = android::ResTable_map::ATTR_OTHER;
172 break;
173
174 default:
175 assert(false);
176 break;
177 }
178
179 Reference key(q);
180 flattenEntry(&key, plural->values[i].get());
181 }
182 }
Adam Lesinski59e04c62016-02-04 15:59:23 -0800183
184 /**
185 * Call this after visiting a Value. This will finish any work that
186 * needs to be done to prepare the entry.
187 */
188 void finish() {
189 mOutEntry->count = util::hostToDevice32(mEntryCount);
190 }
191
192private:
193 void flattenKey(Reference* key, ResTable_map* outEntry) {
194 assert(key->id && "key has no ID");
195 outEntry->name.ident = util::hostToDevice32(key->id.value().id);
196 }
197
198 void flattenValue(Item* value, ResTable_map* outEntry) {
199 bool result = value->flatten(&outEntry->value);
200 assert(result && "flatten failed");
201 }
202
203 void flattenEntry(Reference* key, Item* value) {
204 ResTable_map* outEntry = mBuffer->nextBlock<ResTable_map>();
205 flattenKey(key, outEntry);
206 flattenValue(value, outEntry);
207 outEntry->value.size = util::hostToDevice16(sizeof(outEntry->value));
208 mEntryCount++;
209 }
210
211 ResTable_entry_ext* mOutEntry;
212 BigBuffer* mBuffer;
213 size_t mEntryCount = 0;
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700214};
215
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700216class PackageFlattener {
217public:
Adam Lesinski59e04c62016-02-04 15:59:23 -0800218 PackageFlattener(IDiagnostics* diag, ResourceTablePackage* package) :
219 mDiag(diag), mPackage(package) {
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700220 }
221
222 bool flattenPackage(BigBuffer* buffer) {
223 ChunkWriter pkgWriter(buffer);
224 ResTable_package* pkgHeader = pkgWriter.startChunk<ResTable_package>(
225 RES_TABLE_PACKAGE_TYPE);
226 pkgHeader->id = util::hostToDevice32(mPackage->id.value());
227
228 if (mPackage->name.size() >= arraysize(pkgHeader->name)) {
229 mDiag->error(DiagMessage() <<
230 "package name '" << mPackage->name << "' is too long");
231 return false;
232 }
233
234 // Copy the package name in device endianness.
Adam Lesinskid0f116b2016-07-08 15:00:32 -0700235 strcpy16_htod(pkgHeader->name, arraysize(pkgHeader->name),
236 util::utf8ToUtf16(mPackage->name));
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700237
238 // Serialize the types. We do this now so that our type and key strings
239 // are populated. We write those first.
240 BigBuffer typeBuffer(1024);
241 flattenTypes(&typeBuffer);
242
243 pkgHeader->typeStrings = util::hostToDevice32(pkgWriter.size());
244 StringPool::flattenUtf16(pkgWriter.getBuffer(), mTypePool);
245
246 pkgHeader->keyStrings = util::hostToDevice32(pkgWriter.size());
Alexandria Cornwalle0af9252016-07-22 16:25:02 -0700247 StringPool::flattenUtf8(pkgWriter.getBuffer(), mKeyPool);
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700248
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700249 // Append the types.
250 buffer->appendBuffer(std::move(typeBuffer));
251
252 pkgWriter.finish();
253 return true;
254 }
255
256private:
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700257 IDiagnostics* mDiag;
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700258 ResourceTablePackage* mPackage;
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700259 StringPool mTypePool;
260 StringPool mKeyPool;
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700261
Adam Lesinskie78fd612015-10-22 12:48:43 -0700262 template <typename T, bool IsItem>
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700263 T* writeEntry(FlatEntry* entry, BigBuffer* buffer) {
264 static_assert(std::is_same<ResTable_entry, T>::value ||
265 std::is_same<ResTable_entry_ext, T>::value,
266 "T must be ResTable_entry or ResTable_entry_ext");
267
268 T* result = buffer->nextBlock<T>();
269 ResTable_entry* outEntry = (ResTable_entry*)(result);
Adam Lesinski9e10ac72015-10-16 14:37:48 -0700270 if (entry->entry->symbolStatus.state == SymbolState::kPublic) {
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700271 outEntry->flags |= ResTable_entry::FLAG_PUBLIC;
272 }
273
274 if (entry->value->isWeak()) {
275 outEntry->flags |= ResTable_entry::FLAG_WEAK;
276 }
277
Adam Lesinskie78fd612015-10-22 12:48:43 -0700278 if (!IsItem) {
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700279 outEntry->flags |= ResTable_entry::FLAG_COMPLEX;
280 }
281
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700282 outEntry->flags = util::hostToDevice16(outEntry->flags);
Adam Lesinski59e04c62016-02-04 15:59:23 -0800283 outEntry->key.index = util::hostToDevice32(entry->entryKey);
284 outEntry->size = util::hostToDevice16(sizeof(T));
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700285 return result;
286 }
287
288 bool flattenValue(FlatEntry* entry, BigBuffer* buffer) {
Adam Lesinskie78fd612015-10-22 12:48:43 -0700289 if (Item* item = valueCast<Item>(entry->value)) {
290 writeEntry<ResTable_entry, true>(entry, buffer);
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700291 Res_value* outValue = buffer->nextBlock<Res_value>();
Adam Lesinskie78fd612015-10-22 12:48:43 -0700292 bool result = item->flatten(outValue);
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700293 assert(result && "flatten failed");
294 outValue->size = util::hostToDevice16(sizeof(*outValue));
295 } else {
Adam Lesinskie78fd612015-10-22 12:48:43 -0700296 ResTable_entry_ext* outEntry = writeEntry<ResTable_entry_ext, false>(entry, buffer);
Adam Lesinski59e04c62016-02-04 15:59:23 -0800297 MapFlattenVisitor visitor(outEntry, buffer);
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700298 entry->value->accept(&visitor);
Adam Lesinski59e04c62016-02-04 15:59:23 -0800299 visitor.finish();
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700300 }
301 return true;
302 }
303
304 bool flattenConfig(const ResourceTableType* type, const ConfigDescription& config,
305 std::vector<FlatEntry>* entries, BigBuffer* buffer) {
306 ChunkWriter typeWriter(buffer);
307 ResTable_type* typeHeader = typeWriter.startChunk<ResTable_type>(RES_TABLE_TYPE_TYPE);
308 typeHeader->id = type->id.value();
309 typeHeader->config = config;
310 typeHeader->config.swapHtoD();
311
312 auto maxAccum = [](uint32_t max, const std::unique_ptr<ResourceEntry>& a) -> uint32_t {
313 return std::max(max, (uint32_t) a->id.value());
314 };
315
316 // Find the largest entry ID. That is how many entries we will have.
317 const uint32_t entryCount =
318 std::accumulate(type->entries.begin(), type->entries.end(), 0, maxAccum) + 1;
319
320 typeHeader->entryCount = util::hostToDevice32(entryCount);
321 uint32_t* indices = typeWriter.nextBlock<uint32_t>(entryCount);
322
323 assert((size_t) entryCount <= std::numeric_limits<uint16_t>::max() + 1);
324 memset(indices, 0xff, entryCount * sizeof(uint32_t));
325
326 typeHeader->entriesStart = util::hostToDevice32(typeWriter.size());
327
328 const size_t entryStart = typeWriter.getBuffer()->size();
329 for (FlatEntry& flatEntry : *entries) {
330 assert(flatEntry.entry->id.value() < entryCount);
331 indices[flatEntry.entry->id.value()] = util::hostToDevice32(
332 typeWriter.getBuffer()->size() - entryStart);
333 if (!flattenValue(&flatEntry, typeWriter.getBuffer())) {
334 mDiag->error(DiagMessage()
335 << "failed to flatten resource '"
336 << ResourceNameRef(mPackage->name, type->type, flatEntry.entry->name)
337 << "' for configuration '" << config << "'");
338 return false;
339 }
340 }
341 typeWriter.finish();
342 return true;
343 }
344
345 std::vector<ResourceTableType*> collectAndSortTypes() {
346 std::vector<ResourceTableType*> sortedTypes;
347 for (auto& type : mPackage->types) {
Adam Lesinski59e04c62016-02-04 15:59:23 -0800348 if (type->type == ResourceType::kStyleable) {
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700349 // Styleables aren't real Resource Types, they are represented in the R.java
350 // file.
351 continue;
352 }
353
354 assert(type->id && "type must have an ID set");
355
356 sortedTypes.push_back(type.get());
357 }
358 std::sort(sortedTypes.begin(), sortedTypes.end(), cmpIds<ResourceTableType>);
359 return sortedTypes;
360 }
361
362 std::vector<ResourceEntry*> collectAndSortEntries(ResourceTableType* type) {
363 // Sort the entries by entry ID.
364 std::vector<ResourceEntry*> sortedEntries;
365 for (auto& entry : type->entries) {
366 assert(entry->id && "entry must have an ID set");
367 sortedEntries.push_back(entry.get());
368 }
369 std::sort(sortedEntries.begin(), sortedEntries.end(), cmpIds<ResourceEntry>);
370 return sortedEntries;
371 }
372
373 bool flattenTypeSpec(ResourceTableType* type, std::vector<ResourceEntry*>* sortedEntries,
374 BigBuffer* buffer) {
375 ChunkWriter typeSpecWriter(buffer);
376 ResTable_typeSpec* specHeader = typeSpecWriter.startChunk<ResTable_typeSpec>(
377 RES_TABLE_TYPE_SPEC_TYPE);
378 specHeader->id = type->id.value();
379
380 if (sortedEntries->empty()) {
381 typeSpecWriter.finish();
382 return true;
383 }
384
385 // We can't just take the size of the vector. There may be holes in the entry ID space.
386 // Since the entries are sorted by ID, the last one will be the biggest.
387 const size_t numEntries = sortedEntries->back()->id.value() + 1;
388
389 specHeader->entryCount = util::hostToDevice32(numEntries);
390
391 // Reserve space for the masks of each resource in this type. These
392 // show for which configuration axis the resource changes.
393 uint32_t* configMasks = typeSpecWriter.nextBlock<uint32_t>(numEntries);
394
395 const size_t actualNumEntries = sortedEntries->size();
396 for (size_t entryIndex = 0; entryIndex < actualNumEntries; entryIndex++) {
397 ResourceEntry* entry = sortedEntries->at(entryIndex);
398
399 // Populate the config masks for this entry.
400
Adam Lesinski9e10ac72015-10-16 14:37:48 -0700401 if (entry->symbolStatus.state == SymbolState::kPublic) {
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700402 configMasks[entry->id.value()] |=
403 util::hostToDevice32(ResTable_typeSpec::SPEC_PUBLIC);
404 }
405
406 const size_t configCount = entry->values.size();
407 for (size_t i = 0; i < configCount; i++) {
Adam Lesinskie4bb9eb2016-02-12 22:18:51 -0800408 const ConfigDescription& config = entry->values[i]->config;
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700409 for (size_t j = i + 1; j < configCount; j++) {
410 configMasks[entry->id.value()] |= util::hostToDevice32(
Adam Lesinskie4bb9eb2016-02-12 22:18:51 -0800411 config.diff(entry->values[j]->config));
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700412 }
413 }
414 }
415 typeSpecWriter.finish();
416 return true;
417 }
418
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700419 bool flattenTypes(BigBuffer* buffer) {
420 // Sort the types by their IDs. They will be inserted into the StringPool in this order.
421 std::vector<ResourceTableType*> sortedTypes = collectAndSortTypes();
422
423 size_t expectedTypeId = 1;
424 for (ResourceTableType* type : sortedTypes) {
425 // If there is a gap in the type IDs, fill in the StringPool
426 // with empty values until we reach the ID we expect.
427 while (type->id.value() > expectedTypeId) {
Adam Lesinskid0f116b2016-07-08 15:00:32 -0700428 std::stringstream typeName;
429 typeName << "?" << expectedTypeId;
430 mTypePool.makeRef(typeName.str());
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700431 expectedTypeId++;
432 }
433 expectedTypeId++;
434 mTypePool.makeRef(toString(type->type));
435
436 std::vector<ResourceEntry*> sortedEntries = collectAndSortEntries(type);
437
438 if (!flattenTypeSpec(type, &sortedEntries, buffer)) {
439 return false;
440 }
441
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700442 // The binary resource table lists resource entries for each configuration.
443 // We store them inverted, where a resource entry lists the values for each
444 // configuration available. Here we reverse this to match the binary table.
445 std::map<ConfigDescription, std::vector<FlatEntry>> configToEntryListMap;
446 for (ResourceEntry* entry : sortedEntries) {
Adam Lesinskie78fd612015-10-22 12:48:43 -0700447 const uint32_t keyIndex = (uint32_t) mKeyPool.makeRef(entry->name).getIndex();
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700448
449 // Group values by configuration.
450 for (auto& configValue : entry->values) {
Adam Lesinskie4bb9eb2016-02-12 22:18:51 -0800451 configToEntryListMap[configValue->config].push_back(FlatEntry{
452 entry, configValue->value.get(), keyIndex });
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700453 }
454 }
455
456 // Flatten a configuration value.
457 for (auto& entry : configToEntryListMap) {
458 if (!flattenConfig(type, entry.first, &entry.second, buffer)) {
459 return false;
460 }
461 }
462 }
463 return true;
464 }
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700465};
466
467} // namespace
468
469bool TableFlattener::consume(IAaptContext* context, ResourceTable* table) {
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700470 // We must do this before writing the resources, since the string pool IDs may change.
471 table->stringPool.sort([](const StringPool::Entry& a, const StringPool::Entry& b) -> bool {
472 int diff = a.context.priority - b.context.priority;
473 if (diff < 0) return true;
474 if (diff > 0) return false;
475 diff = a.context.config.compare(b.context.config);
476 if (diff < 0) return true;
477 if (diff > 0) return false;
478 return a.value < b.value;
479 });
480 table->stringPool.prune();
481
482 // Write the ResTable header.
483 ChunkWriter tableWriter(mBuffer);
484 ResTable_header* tableHeader = tableWriter.startChunk<ResTable_header>(RES_TABLE_TYPE);
485 tableHeader->packageCount = util::hostToDevice32(table->packages.size());
486
487 // Flatten the values string pool.
488 StringPool::flattenUtf8(tableWriter.getBuffer(), table->stringPool);
489
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700490 BigBuffer packageBuffer(1024);
491
492 // Flatten each package.
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700493 for (auto& package : table->packages) {
Adam Lesinski59e04c62016-02-04 15:59:23 -0800494 PackageFlattener flattener(context->getDiagnostics(), package.get());
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700495 if (!flattener.flattenPackage(&packageBuffer)) {
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700496 return false;
497 }
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700498 }
499
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700500 // Finally merge all the packages into the main buffer.
501 tableWriter.getBuffer()->appendBuffer(std::move(packageBuffer));
Adam Lesinski9ba47d82015-10-13 11:37:10 -0700502 tableWriter.finish();
503 return true;
Adam Lesinski1ab598f2015-08-14 14:26:04 -0700504}
505
506} // namespace aapt