merge: different msg if nothing was merged

This commit is contained in:
Vincent Breitmoser 2014-07-15 19:17:08 +02:00
parent 858fe47d46
commit 29145e49c9
4 changed files with 9 additions and 3 deletions

View File

@ -748,8 +748,12 @@ public class UncachedKeyRing {
}
log.add(LogLevel.DEBUG, LogType.MSG_MG_FOUND_NEW,
indent, Integer.toString(newCerts));
if (newCerts > 0) {
log.add(LogLevel.DEBUG, LogType.MSG_MG_FOUND_NEW, indent,
Integer.toString(newCerts));
} else {
log.add(LogLevel.DEBUG, LogType.MSG_MG_UNCHANGED, indent);
}
return new UncachedKeyRing(result);

View File

@ -792,7 +792,7 @@ public class ProviderHelper {
try {
UncachedKeyRing oldPublicRing = getWrappedPublicKeyRing(masterKeyId).getUncachedKeyRing();
// Merge data from new public ring into secret one
// Merge data from new secret ring into public one
publicRing = oldPublicRing.merge(secretRing, mLog, mIndent);
if (publicRing == null) {
return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog);

View File

@ -242,6 +242,7 @@ public class OperationResultParcel implements Parcelable {
MSG_MG_HETEROGENEOUS (R.string.msg_mg_heterogeneous),
MSG_MG_NEW_SUBKEY (R.string.msg_mg_new_subkey),
MSG_MG_FOUND_NEW (R.string.msg_mg_found_new),
MSG_MG_UNCHANGED (R.string.msg_mg_unchanged),
// secret key create
MSG_CR (R.string.msg_cr),

View File

@ -636,6 +636,7 @@
<string name="msg_mg_heterogeneous">Tried to consolidate heterogeneous keyrings</string>
<string name="msg_mg_new_subkey">Adding new subkey %s</string>
<string name="msg_mg_found_new">Found %s new certificates in keyring</string>
<string name="msg_mg_unchanged">No new certificates</string>
<!-- createSecretKeyRing -->
<string name="msg_cr">Generating new master key</string>