diff options
author | Adam Lesinski <adamlesinski@google.com> | 2016-02-22 09:16:33 -0800 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2016-02-26 15:57:59 -0800 |
commit | afc79be228596c56ea68c0d2fa22d0a8d733be47 (patch) | |
tree | 3b1d5a93a03008c7b43aee3f2c25132648f5b2ba /tools/aapt/ResourceTable.h | |
parent | 187b9b9e5bb3c6a83a26f2ece23a6cfa16614d03 (diff) |
AAPT: Allow duplicate attribute definitions if identical
This allows libraries to coexist a bit easier, since a lot of them
declare the same attribute. When used together they cause errors.
Bug:27101533
Change-Id: I649cf17bc587c4814f849d5ac522daf74495adcf
Diffstat (limited to 'tools/aapt/ResourceTable.h')
-rw-r--r-- | tools/aapt/ResourceTable.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/aapt/ResourceTable.h b/tools/aapt/ResourceTable.h index 4b7b3cdcef2b..cf1e992ec330 100644 --- a/tools/aapt/ResourceTable.h +++ b/tools/aapt/ResourceTable.h @@ -571,6 +571,18 @@ public: void getDensityVaryingResources(KeyedVector<Symbol, Vector<SymbolDefinition> >& resources); + /** + * Make an attribute with the specified format. If another attribute with the same name but + * different format exists, this method returns false. If the name is not taken, or if the + * format is identical, this returns true. + */ + bool makeAttribute(const String16& package, + const String16& name, + const SourcePos& source, + int32_t format, + const String16& comment, + bool appendComment); + private: void writePublicDefinitions(const String16& package, FILE* fp, bool pub); sp<Package> getPackage(const String16& package); |