Loading tools/aapt/ResourceTable.cpp +15 −9 Original line number Diff line number Diff line Loading @@ -1517,7 +1517,8 @@ status_t ResourceTable::addEntry(const SourcePos& sourcePos, } #endif sp<Entry> e = getEntry(package, type, name, sourcePos, params, doSetIndex); sp<Entry> e = getEntry(package, type, name, sourcePos, overwrite, params, doSetIndex); if (e == NULL) { return UNKNOWN_ERROR; } Loading Loading @@ -1560,8 +1561,7 @@ status_t ResourceTable::startBag(const SourcePos& sourcePos, String8(name).string()); return UNKNOWN_ERROR; } sp<Entry> e = getEntry(package, type, name, sourcePos, params); sp<Entry> e = getEntry(package, type, name, sourcePos, overlay, params); if (e == NULL) { return UNKNOWN_ERROR; } Loading Loading @@ -1615,8 +1615,7 @@ status_t ResourceTable::addBag(const SourcePos& sourcePos, sourcePos.file.striing(), sourcePos.line, String8(type).string()); } #endif sp<Entry> e = getEntry(package, type, name, sourcePos, params); sp<Entry> e = getEntry(package, type, name, sourcePos, replace, params); if (e == NULL) { return UNKNOWN_ERROR; } Loading Loading @@ -3219,11 +3218,17 @@ status_t ResourceTable::Type::addPublic(const SourcePos& sourcePos, sp<ResourceTable::Entry> ResourceTable::Type::getEntry(const String16& entry, const SourcePos& sourcePos, const ResTable_config* config, bool doSetIndex) bool doSetIndex, bool overlay) { int pos = -1; sp<ConfigList> c = mConfigs.valueFor(entry); if (c == NULL) { if (overlay == true) { sourcePos.error("Resource %s appears in overlay but not" " in the base package.\n", String8(entry).string()); return NULL; } c = new ConfigList(entry, sourcePos); mConfigs.add(entry, c); pos = (int)mOrderedConfigs.size(); Loading Loading @@ -3522,6 +3527,7 @@ sp<ResourceTable::Entry> ResourceTable::getEntry(const String16& package, const String16& type, const String16& name, const SourcePos& sourcePos, bool overlay, const ResTable_config* config, bool doSetIndex) { Loading @@ -3529,7 +3535,7 @@ sp<ResourceTable::Entry> ResourceTable::getEntry(const String16& package, if (t == NULL) { return NULL; } return t->getEntry(name, sourcePos, config, doSetIndex); return t->getEntry(name, sourcePos, config, doSetIndex, overlay); } sp<const ResourceTable::Entry> ResourceTable::getEntry(uint32_t resID, Loading tools/aapt/ResourceTable.h +3 −1 Original line number Diff line number Diff line Loading @@ -418,7 +418,8 @@ public: sp<Entry> getEntry(const String16& entry, const SourcePos& pos, const ResTable_config* config = NULL, bool doSetIndex = false); bool doSetIndex = false, bool overlay = false); const SourcePos& getFirstPublicSourcePos() const { return *mFirstPublicSourcePos; } Loading Loading @@ -502,6 +503,7 @@ private: const String16& type, const String16& name, const SourcePos& pos, bool overlay, const ResTable_config* config = NULL, bool doSetIndex = false); sp<const Entry> getEntry(uint32_t resID, Loading Loading
tools/aapt/ResourceTable.cpp +15 −9 Original line number Diff line number Diff line Loading @@ -1517,7 +1517,8 @@ status_t ResourceTable::addEntry(const SourcePos& sourcePos, } #endif sp<Entry> e = getEntry(package, type, name, sourcePos, params, doSetIndex); sp<Entry> e = getEntry(package, type, name, sourcePos, overwrite, params, doSetIndex); if (e == NULL) { return UNKNOWN_ERROR; } Loading Loading @@ -1560,8 +1561,7 @@ status_t ResourceTable::startBag(const SourcePos& sourcePos, String8(name).string()); return UNKNOWN_ERROR; } sp<Entry> e = getEntry(package, type, name, sourcePos, params); sp<Entry> e = getEntry(package, type, name, sourcePos, overlay, params); if (e == NULL) { return UNKNOWN_ERROR; } Loading Loading @@ -1615,8 +1615,7 @@ status_t ResourceTable::addBag(const SourcePos& sourcePos, sourcePos.file.striing(), sourcePos.line, String8(type).string()); } #endif sp<Entry> e = getEntry(package, type, name, sourcePos, params); sp<Entry> e = getEntry(package, type, name, sourcePos, replace, params); if (e == NULL) { return UNKNOWN_ERROR; } Loading Loading @@ -3219,11 +3218,17 @@ status_t ResourceTable::Type::addPublic(const SourcePos& sourcePos, sp<ResourceTable::Entry> ResourceTable::Type::getEntry(const String16& entry, const SourcePos& sourcePos, const ResTable_config* config, bool doSetIndex) bool doSetIndex, bool overlay) { int pos = -1; sp<ConfigList> c = mConfigs.valueFor(entry); if (c == NULL) { if (overlay == true) { sourcePos.error("Resource %s appears in overlay but not" " in the base package.\n", String8(entry).string()); return NULL; } c = new ConfigList(entry, sourcePos); mConfigs.add(entry, c); pos = (int)mOrderedConfigs.size(); Loading Loading @@ -3522,6 +3527,7 @@ sp<ResourceTable::Entry> ResourceTable::getEntry(const String16& package, const String16& type, const String16& name, const SourcePos& sourcePos, bool overlay, const ResTable_config* config, bool doSetIndex) { Loading @@ -3529,7 +3535,7 @@ sp<ResourceTable::Entry> ResourceTable::getEntry(const String16& package, if (t == NULL) { return NULL; } return t->getEntry(name, sourcePos, config, doSetIndex); return t->getEntry(name, sourcePos, config, doSetIndex, overlay); } sp<const ResourceTable::Entry> ResourceTable::getEntry(uint32_t resID, Loading
tools/aapt/ResourceTable.h +3 −1 Original line number Diff line number Diff line Loading @@ -418,7 +418,8 @@ public: sp<Entry> getEntry(const String16& entry, const SourcePos& pos, const ResTable_config* config = NULL, bool doSetIndex = false); bool doSetIndex = false, bool overlay = false); const SourcePos& getFirstPublicSourcePos() const { return *mFirstPublicSourcePos; } Loading Loading @@ -502,6 +503,7 @@ private: const String16& type, const String16& name, const SourcePos& pos, bool overlay, const ResTable_config* config = NULL, bool doSetIndex = false); sp<const Entry> getEntry(uint32_t resID, Loading