summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-04-05 00:22:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-05 00:23:11 +0000
commit745a42bbb9db8d54af5381ef5fe41828bf6fc352 (patch)
tree320320b05df750612e8af1cbb184e7b98b639c15 /tools
parenta151ef8c667a52d9fae28c09f780784f19bdb039 (diff)
parent1bcc3d691fd1cb68abced62caf3024e2bb228561 (diff)
downloadframeworks_base-745a42bbb9db8d54af5381ef5fe41828bf6fc352.zip
frameworks_base-745a42bbb9db8d54af5381ef5fe41828bf6fc352.tar.gz
frameworks_base-745a42bbb9db8d54af5381ef5fe41828bf6fc352.tar.bz2
Merge "aapt: add support for optional uses-permission" into jb-mr2-dev
Diffstat (limited to 'tools')
-rw-r--r--tools/aapt/Command.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 84f5a5c..cadac02 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -592,6 +592,10 @@ int doDump(Bundle* bundle)
goto bail;
}
printf("uses-permission: %s\n", name.string());
+ int req = getIntegerAttribute(tree, REQUIRED_ATTR, NULL, 1);
+ if (!req) {
+ printf("optional-permission: %s\n", name.string());
+ }
}
}
} else if (strcmp("badging", option) == 0) {
@@ -1033,6 +1037,10 @@ int doDump(Bundle* bundle)
hasWriteCallLogPermission = true;
}
printf("uses-permission:'%s'\n", name.string());
+ int req = getIntegerAttribute(tree, REQUIRED_ATTR, NULL, 1);
+ if (!req) {
+ printf("optional-permission:'%s'\n", name.string());
+ }
} else {
fprintf(stderr, "ERROR getting 'android:name' attribute: %s\n",
error.string());