From 774d89bf87b93b4cf2cb5fdc88f0df89b14181f7 Mon Sep 17 00:00:00 2001 From: Suchi Amalapurapu Date: Sun, 20 Sep 2009 13:39:37 -0700 Subject: [PATCH] Fix issue with printing gles version in aapt dump badging option 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Command.cpp b/Command.cpp index f2cdf75..4742341 100644 --- a/Command.cpp +++ b/Command.cpp @@ -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; } -- 2.50.0