diff options
Diffstat (limited to 'tools/aapt2/ResourceTable.h')
-rw-r--r-- | tools/aapt2/ResourceTable.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/aapt2/ResourceTable.h b/tools/aapt2/ResourceTable.h index 94bacd80bbb2..706f56a2776f 100644 --- a/tools/aapt2/ResourceTable.h +++ b/tools/aapt2/ResourceTable.h @@ -143,11 +143,21 @@ public: bool addResource(const ResourceNameRef& name, const ConfigDescription& config, const SourceLine& source, std::unique_ptr<Value> value); + /** + * Same as addResource, but doesn't verify the validity of the name. This is used + * when loading resources from an existing binary resource table that may have mangled + * names. + */ + bool addResourceAllowMangled(const ResourceNameRef& name, const ConfigDescription& config, + const SourceLine& source, std::unique_ptr<Value> value); + bool addResource(const ResourceNameRef& name, const ResourceId resId, const ConfigDescription& config, const SourceLine& source, std::unique_ptr<Value> value); bool markPublic(const ResourceNameRef& name, const ResourceId resId, const SourceLine& source); + bool markPublicAllowMangled(const ResourceNameRef& name, const ResourceId resId, + const SourceLine& source); /* * Merges the resources from `other` into this table, mangling the names of the resources @@ -176,6 +186,12 @@ private: std::unique_ptr<ResourceEntry>& findOrCreateEntry(std::unique_ptr<ResourceTableType>& type, const StringPiece16& name); + bool addResourceImpl(const ResourceNameRef& name, const ResourceId resId, + const ConfigDescription& config, const SourceLine& source, + std::unique_ptr<Value> value, const char16_t* validChars); + bool markPublicImpl(const ResourceNameRef& name, const ResourceId resId, + const SourceLine& source, const char16_t* validChars); + std::u16string mPackage; size_t mPackageId; |