diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-05-13 15:06:13 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-05-15 18:23:56 -0700 |
commit | 62da8461ed5317fe78ae5e3793662694e7fc99a3 (patch) | |
tree | e82ca35be1ad67465407f6992e5e0f47fef73c39 /tools/aapt/ResourceTable.cpp | |
parent | 53071d6d159f6dfd6fe0328a39bcf967ef308a64 (diff) |
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.
Diffstat (limited to 'tools/aapt/ResourceTable.cpp')
-rw-r--r-- | tools/aapt/ResourceTable.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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<AaptAssets>& assets, if (root == NULL) { return UNKNOWN_ERROR; } + + return compileXmlFile(assets, root, target, table, options); +} + +status_t compileXmlFile(const sp<AaptAssets>& assets, + const sp<XMLNode>& root, + const sp<AaptFile>& 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<AaptAssets } else if (id != 0) { if (id == 127) { if (mHaveAppPackage) { - fprintf(stderr, "Included resource have two application packages!\n"); + fprintf(stderr, "Included resources have two application packages!\n"); return UNKNOWN_ERROR; } mHaveAppPackage = true; |