Fix crash in KeySet dump

This was unfortunately DOSing some important parts of the Package
Manager's dumpsys output.

Change-Id: I228f23e8e26820b40a8d8772cd5f5b04ee8317d9
This commit is contained in:
Christopher Tate
2014-09-03 16:11:31 -07:00
parent e8f8bc0ad6
commit 6441bc7e53

View File

@@ -538,14 +538,17 @@ public class KeySetManagerService {
pw.println("");
}
printedLabel = false;
for (long keySetId : pkg.keySetData.getSigningKeySets()) {
if (!printedLabel) {
pw.print(" Signing KeySets: ");
printedLabel = true;
} else {
pw.print(", ");
final long[] signingKeySets = pkg.keySetData.getSigningKeySets();
if (signingKeySets != null) {
for (long keySetId : signingKeySets) {
if (!printedLabel) {
pw.print(" Signing KeySets: ");
printedLabel = true;
} else {
pw.print(", ");
}
pw.print(Long.toString(keySetId));
}
pw.print(Long.toString(keySetId));
}
if (printedLabel) {
pw.println("");