From 62da8461ed5317fe78ae5e3793662694e7fc99a3 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 13 May 2009 15:06:13 -0700 Subject: Implement compatibility support for WRITE_SDCARD permission. Now old applications will automatically be granted it. Also renamed it from SDCARD_WRITE to WRITE_SDCARD to be consistent with our other permissions, and re-arranged how we do targetSdkVersion to actually be usuable for this kind of stuff. Note that right now this results in basically all apps being given the WRITE_SDCARD permission, because their targetSdkVersion is not set. I will be dealing with that in a future change. --- tools/aapt/ResourceTable.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tools/aapt/ResourceTable.cpp') diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index ef11a83c8387..25ab1474d948 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -23,6 +23,16 @@ status_t compileXmlFile(const sp& assets, if (root == NULL) { return UNKNOWN_ERROR; } + + return compileXmlFile(assets, root, target, table, options); +} + +status_t compileXmlFile(const sp& assets, + const sp& root, + const sp& target, + ResourceTable* table, + int options) +{ if ((options&XML_COMPILE_STRIP_WHITESPACE) != 0) { root->removeWhitespace(true, NULL); } else if ((options&XML_COMPILE_COMPACT_WHITESPACE) != 0) { @@ -1307,7 +1317,7 @@ status_t ResourceTable::addIncludedResources(Bundle* bundle, const sp