]> git.saurik.com Git - android/aapt.git/commitdiff
Scan for android namespace in manifest
authorKenny Root <kroot@google.com>
Thu, 25 Feb 2010 04:00:03 +0000 (20:00 -0800)
committerKenny Root <kroot@google.com>
Thu, 25 Feb 2010 04:03:17 +0000 (20:03 -0800)
android:minSdkVersion wasn't being correctly scanned because the
namespace was incorrect. This fixes that problem so packages aren't
generated as UTF-8 when minSdkVersion is less than 7.

Change-Id: I8f45d47ea886915da6a4770f6e111e6085d61bee

Resource.cpp

index 88c5441c26d3442425eaaf931a06c4bd1e7b5596..f8c5c38462ac8c09cdd33bc570eed3921def933b 100644 (file)
@@ -221,12 +221,12 @@ static status_t parsePackage(Bundle* bundle, const sp<AaptAssets>& assets,
            && code != ResXMLTree::BAD_DOCUMENT) {
         if (code == ResXMLTree::START_TAG) {
             if (strcmp16(block.getElementName(&len), uses_sdk16.string()) == 0) {
-                ssize_t minSdkIndex = block.indexOfAttribute("android",
+                ssize_t minSdkIndex = block.indexOfAttribute(RESOURCES_ANDROID_NAMESPACE,
                                                              "minSdkVersion");
                 if (minSdkIndex >= 0) {
                     String8 minSdkString = String8(
                         block.getAttributeStringValue(minSdkIndex, &len));
-                   bundle->setMinSdkVersion(minSdkString.string());
+                    bundle->setMinSdkVersion(minSdkString.string());
                 }
             }
         }