Merge "KeySetManagerService: prevent NPE"

This commit is contained in:
Treehugger Robot
2017-01-29 17:14:36 +00:00
committed by Gerrit Code Review

View File

@@ -287,7 +287,7 @@ public class KeySetManagerService {
for (int i = 0; i < defMapSize; i++) { for (int i = 0; i < defMapSize; i++) {
String alias = definedMapping.keyAt(i); String alias = definedMapping.keyAt(i);
ArraySet<PublicKey> pubKeys = definedMapping.valueAt(i); ArraySet<PublicKey> pubKeys = definedMapping.valueAt(i);
if (alias != null && pubKeys != null || pubKeys.size() > 0) { if (alias != null && pubKeys != null && pubKeys.size() > 0) {
KeySetHandle ks = addKeySetLPw(pubKeys); KeySetHandle ks = addKeySetLPw(pubKeys);
newKeySetAliases.put(alias, ks.getId()); newKeySetAliases.put(alias, ks.getId());
} }