summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSuchi Amalapurapu <asuchitra@google.com>2009-09-20 13:39:37 -0700
committerSuchi Amalapurapu <asuchitra@google.com>2009-09-20 13:40:02 -0700
commit40b94725dc1c62ea66db0b9502dd81b97dd3e35f (patch)
treebb7d73271a12f26ea9774fb149d744f08c64c405 /tools
parentd163f4babe101b89aaf322c34d3bafeae237f7da (diff)
downloadframeworks_base-40b94725dc1c62ea66db0b9502dd81b97dd3e35f.zip
frameworks_base-40b94725dc1c62ea66db0b9502dd81b97dd3e35f.tar.gz
frameworks_base-40b94725dc1c62ea66db0b9502dd81b97dd3e35f.tar.bz2
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.
Diffstat (limited to 'tools')
-rw-r--r--tools/aapt/Command.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index f2cdf75..4742341 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/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;
}