]> git.saurik.com Git - android/aapt.git/commitdiff
Fix issue with printing gles version in aapt dump badging option
authorSuchi Amalapurapu <asuchitra@google.com>
Sun, 20 Sep 2009 20:39:37 +0000 (13:39 -0700)
committerSuchi Amalapurapu <asuchitra@google.com>
Sun, 20 Sep 2009 20:40:02 +0000 (13:40 -0700)
If the name attribute for uses-feature or uses-permission is empty
the error value is still empty indicating error and preventing the
else part from being checked as it should be.

Command.cpp

index f2cdf752dec05c72853930d2b5ce3698ff6e88ad..47423418e8b2ba5b7e80fb795353a95540f37191 100644 (file)
@@ -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;
                             }