diff options
Diffstat (limited to 'tools/aapt')
-rw-r--r-- | tools/aapt/Android.mk | 4 | ||||
-rw-r--r-- | tools/aapt/Command.cpp | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk index 5b88669..9b1658a 100644 --- a/tools/aapt/Android.mk +++ b/tools/aapt/Android.mk @@ -39,14 +39,14 @@ LOCAL_C_INCLUDES += external/libpng LOCAL_C_INCLUDES += external/zlib LOCAL_C_INCLUDES += build/libs/host/include -#LOCAL_WHOLE_STATIC_LIBRARIES := LOCAL_STATIC_LIBRARIES := \ libhost \ libandroidfw \ libutils \ libcutils \ libexpat \ - libpng + libpng \ + liblog ifeq ($(HOST_OS),linux) LOCAL_LDLIBS += -lrt -ldl -lpthread 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()); |