From 9d0f7d44d5cc5322415f52f7ce03cc37a478b350 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Wed, 28 Oct 2015 15:44:27 -0700 Subject: Implement AAPT Bundle format AAPT will scan XML files looking for the XML tag. The SINGLE child element of the tag is extracted into its own top level resource. It is given a generated name. The parent element of is then given the resource attribute that was assigned to the `name' attribute. The value is set to a reference to the generated resource. Bug:22627686 Change-Id: I31bc96aae30d38bfd0b16508d0f585de5fd88a07 --- tools/aapt/ResourceTable.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools/aapt/ResourceTable.h') diff --git a/tools/aapt/ResourceTable.h b/tools/aapt/ResourceTable.h index c4bdf09d8b19..8ef84f773f18 100644 --- a/tools/aapt/ResourceTable.h +++ b/tools/aapt/ResourceTable.h @@ -83,6 +83,7 @@ struct CompileResourceWorkItem { String16 resourceName; String8 resPath; sp file; + sp xmlRoot; }; class ResourceTable : public ResTable::Accessor @@ -206,6 +207,12 @@ public: const sp& file, const sp& root); + status_t processBundleFormat(const Bundle* bundle, + const String16& resourceName, + const sp& file, + const sp& parent); + + sp flatten(Bundle* bundle, const sp& filter, const bool isBase); @@ -586,6 +593,11 @@ private: Res_value* outValue); int getPublicAttributeSdkLevel(uint32_t attrId) const; + status_t processBundleFormatImpl(const Bundle* bundle, + const String16& resourceName, + const sp& file, + const sp& parent, + Vector >* namespaces); String16 mAssetsPackage; PackageType mPackageType; -- cgit v1.2.3-59-g8ed1b