]> git.saurik.com Git - android/aapt.git/blobdiff - Command.cpp
am f1871e27: Merge change 26009 into eclair
[android/aapt.git] / Command.cpp
index f2cdf752dec05c72853930d2b5ce3698ff6e88ad..3019bd0f5e9e828dc8c68a961fcd9336044c8bdf 100644 (file)
@@ -401,7 +401,7 @@ int doDump(Bundle* bundle)
             ResXMLTree tree;
             asset = assets.openNonAsset(resname, Asset::ACCESS_BUFFER);
             if (asset == NULL) {
-                fprintf(stderr, "ERROR: dump failed because resource %p found\n", resname);
+                fprintf(stderr, "ERROR: dump failed because resource %s found\n", resname);
                 goto bail;
             }
 
@@ -427,7 +427,7 @@ int doDump(Bundle* bundle)
             ResXMLTree tree;
             asset = assets.openNonAsset(resname, Asset::ACCESS_BUFFER);
             if (asset == NULL) {
-                fprintf(stderr, "ERROR: dump failed because resource %p found\n", resname);
+                fprintf(stderr, "ERROR: dump failed because resource %s found\n", resname);
                 goto bail;
             }
 
@@ -712,7 +712,8 @@ int doDump(Bundle* bundle)
                                 LARGE_SCREEN_ATTR, NULL, 1);
                     } else if (tag == "uses-feature") {
                         String8 name = getAttribute(tree, NAME_ATTR, &error);
-                        if (error == "") {
+
+                        if (name != "" && error == "") {
                             int req = getIntegerAttribute(tree,
                                     REQUIRED_ATTR, NULL, 1);
                             if (name == "android.hardware.camera") {
@@ -729,7 +730,7 @@ int doDump(Bundle* bundle)
                         }
                     } else if (tag == "uses-permission") {
                         String8 name = getAttribute(tree, NAME_ATTR, &error);
-                        if (error == "") {
+                        if (name != "" && error == "") {
                             if (name == "android.permission.CAMERA") {
                                 hasCameraPermission = true;
                             }