OSDN Git Service

AAPT: Dump an APK's split name attribute
authorAdam Lesinski <adamlesinski@google.com>
Mon, 11 Aug 2014 16:41:56 +0000 (09:41 -0700)
committerAdam Lesinski <adamlesinski@google.com>
Tue, 12 Aug 2014 22:17:25 +0000 (22:17 +0000)
Bug:16919497

Change-Id: I109e21bff9e4a64a10f48dce7f2d41102b32ee1d

tools/aapt/Command.cpp

index ccbdadd..41102fe 100644 (file)
@@ -1163,8 +1163,15 @@ int doDump(Bundle* bundle)
                         fprintf(stderr, "ERROR getting 'android:versionName' attribute: %s\n", error.string());
                         goto bail;
                     }
-                    printf("versionName='%s'\n",
+                    printf("versionName='%s'",
                             ResTable::normalizeForOutput(versionName.string()).string());
+
+                    String8 splitName = getAttribute(tree, NULL, "split", NULL);
+                    if (!splitName.isEmpty()) {
+                        printf(" split='%s'", ResTable::normalizeForOutput(
+                                    splitName.string()).string());
+                    }
+                    printf("\n");
                 } else if (depth == 2) {
                     withinApplication = false;
                     if (tag == "application") {