Skip to content

Commit b1955c9

Browse files
krutonAndroid (Google) Code Review
authored andcommitted
Merge "Add package-verifier to aapt dump badging"
2 parents a44ad81 + 56088a5 commit b1955c9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/aapt/Command.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ enum {
368368
REQUIRES_SMALLEST_WIDTH_DP_ATTR = 0x01010364,
369369
COMPATIBLE_WIDTH_LIMIT_DP_ATTR = 0x01010365,
370370
LARGEST_WIDTH_LIMIT_DP_ATTR = 0x01010366,
371+
PUBLIC_KEY_ATTR = 0x010103a6,
371372
};
372373

373374
const char *getComponentName(String8 &pkgName, String8 &componentName) {
@@ -1021,6 +1022,15 @@ int doDump(Bundle* bundle)
10211022
} else if (tag == "compatible-screens") {
10221023
printCompatibleScreens(tree);
10231024
depth--;
1025+
} else if (tag == "package-verifier") {
1026+
String8 name = getAttribute(tree, NAME_ATTR, &error);
1027+
if (name != "" && error == "") {
1028+
String8 publicKey = getAttribute(tree, PUBLIC_KEY_ATTR, &error);
1029+
if (publicKey != "" && error == "") {
1030+
printf("package-verifier: name='%s' publicKey='%s'\n",
1031+
name.string(), publicKey.string());
1032+
}
1033+
}
10241034
}
10251035
} else if (depth == 3 && withinApplication) {
10261036
withinActivity = false;

0 commit comments

Comments
 (0)