]> git.saurik.com Git - android/aapt.git/commitdiff
Merge "Adding a line for android-debuggable to 'dump badging' if AndroidManifest...
authorDan Morrill <morrildl@google.com>
Wed, 11 Apr 2012 00:13:17 +0000 (17:13 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 11 Apr 2012 00:13:17 +0000 (17:13 -0700)
Command.cpp

index 689aa8e3979cb6261a062cd93bf74a5b47e121bc..cbd591f971a93bdb314dc2ec1b00ebf0aa7b9b9b 100644 (file)
@@ -345,6 +345,7 @@ enum {
     LABEL_ATTR = 0x01010001,
     ICON_ATTR = 0x01010002,
     NAME_ATTR = 0x01010003,
+    DEBUGGABLE_ATTR = 0x0101000f,
     VERSION_CODE_ATTR = 0x0101021b,
     VERSION_NAME_ATTR = 0x0101021c,
     SCREEN_ORIENTATION_ATTR = 0x0101001e,
@@ -830,6 +831,15 @@ int doDump(Bundle* bundle)
                         if (testOnly != 0) {
                             printf("testOnly='%d'\n", testOnly);
                         }
+
+                        int32_t debuggable = getResolvedIntegerAttribute(&res, tree, DEBUGGABLE_ATTR, &error, 0);
+                        if (error != "") {
+                            fprintf(stderr, "ERROR getting 'android:debuggable' attribute: %s\n", error.string());
+                            goto bail;
+                        }
+                        if (debuggable != 0) {
+                            printf("application-debuggable\n");
+                        }
                     } else if (tag == "uses-sdk") {
                         int32_t code = getIntegerAttribute(tree, MIN_SDK_VERSION_ATTR, &error);
                         if (error != "") {