summaryrefslogtreecommitdiff
path: root/tools/aapt/ResourceTable.h
diff options
context:
space:
mode:
author Adam Lesinski <adamlesinski@google.com> 2016-02-22 09:16:33 -0800
committer Adam Lesinski <adamlesinski@google.com> 2016-02-22 09:25:06 -0800
commitc25283b5e206ceae2aa6eb01877b79c3c1f0adfb (patch)
treeb76246dd9a2392ffe2ffd670dc3893ffb7ca1807 /tools/aapt/ResourceTable.h
parent62e1f4891773eecbd144d58e05c61562bb46d2eb (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: I10327251636392e810637a79e7c9aa514f3f07a6
Diffstat (limited to 'tools/aapt/ResourceTable.h')
-rw-r--r--tools/aapt/ResourceTable.h12
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);