mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-04 16:25:05 -05:00
change the way merging is logged
This commit is contained in:
parent
7c4bbc83cb
commit
30d0afa363
@ -306,6 +306,8 @@ public abstract class OperationResult implements Parcelable {
|
||||
MSG_IP_MASTER_FLAGS_XXSX (LogLevel.DEBUG, R.string.msg_ip_master_flags_xxsx),
|
||||
MSG_IP_MASTER_FLAGS_XXXA (LogLevel.DEBUG, R.string.msg_ip_master_flags_xxxa),
|
||||
MSG_IP_MASTER_FLAGS_XXXX (LogLevel.DEBUG, R.string.msg_ip_master_flags_xxxx),
|
||||
MSG_IP_MERGE_PUBLIC (LogLevel.DEBUG, R.string.msg_ip_merge_public),
|
||||
MSG_IP_MERGE_SECRET (LogLevel.DEBUG, R.string.msg_ip_merge_secret),
|
||||
MSG_IP_SUBKEY (LogLevel.DEBUG, R.string.msg_ip_subkey),
|
||||
MSG_IP_SUBKEY_EXPIRED (LogLevel.DEBUG, R.string.msg_ip_subkey_expired),
|
||||
MSG_IP_SUBKEY_EXPIRES (LogLevel.DEBUG, R.string.msg_ip_subkey_expires),
|
||||
@ -347,6 +349,8 @@ public abstract class OperationResult implements Parcelable {
|
||||
MSG_IS_BAD_TYPE_PUBLIC (LogLevel.WARN, R.string.msg_is_bad_type_public),
|
||||
MSG_IS_DB_EXCEPTION (LogLevel.DEBUG, R.string.msg_is_db_exception),
|
||||
MSG_IS_ERROR_IO_EXC(LogLevel.DEBUG, R.string.msg_is_error_io_exc),
|
||||
MSG_IS_MERGE_PUBLIC (LogLevel.DEBUG, R.string.msg_is_merge_public),
|
||||
MSG_IS_MERGE_SECRET (LogLevel.DEBUG, R.string.msg_is_merge_secret),
|
||||
MSG_IS_IMPORTING_SUBKEYS (LogLevel.DEBUG, R.string.msg_is_importing_subkeys),
|
||||
MSG_IS_PUBRING_GENERATE (LogLevel.DEBUG, R.string.msg_is_pubring_generate),
|
||||
MSG_IS_SUBKEY_NONEXISTENT (LogLevel.DEBUG, R.string.msg_is_subkey_nonexistent),
|
||||
|
@ -787,8 +787,8 @@ public class UncachedKeyRing {
|
||||
*/
|
||||
public UncachedKeyRing merge(UncachedKeyRing other, OperationLog log, int indent) {
|
||||
|
||||
log.add(isSecret() ? LogType.MSG_MG_SECRET : LogType.MSG_MG_PUBLIC,
|
||||
indent, KeyFormattingUtils.convertKeyIdToHex(getMasterKeyId()));
|
||||
// log.add(isSecret() ? LogType.MSG_MG_SECRET : LogType.MSG_MG_PUBLIC,
|
||||
// indent, KeyFormattingUtils.convertKeyIdToHex(getMasterKeyId()));
|
||||
indent += 1;
|
||||
|
||||
long masterKeyId = other.getMasterKeyId();
|
||||
|
@ -744,6 +744,7 @@ public class ProviderHelper {
|
||||
UncachedKeyRing oldPublicRing = getCanonicalizedPublicKeyRing(masterKeyId).getUncachedKeyRing();
|
||||
|
||||
// Merge data from new public ring into the old one
|
||||
log(LogType.MSG_IP_MERGE_PUBLIC);
|
||||
publicRing = oldPublicRing.merge(publicRing, mLog, mIndent);
|
||||
|
||||
// If this is null, there is an error in the log so we can just return
|
||||
@ -780,6 +781,7 @@ public class ProviderHelper {
|
||||
UncachedKeyRing secretRing = getCanonicalizedSecretKeyRing(publicRing.getMasterKeyId()).getUncachedKeyRing();
|
||||
|
||||
// Merge data from new public ring into secret one
|
||||
log(LogType.MSG_IP_MERGE_SECRET);
|
||||
secretRing = secretRing.merge(publicRing, mLog, mIndent);
|
||||
if (secretRing == null) {
|
||||
return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog, null);
|
||||
@ -836,6 +838,7 @@ public class ProviderHelper {
|
||||
UncachedKeyRing oldSecretRing = getCanonicalizedSecretKeyRing(masterKeyId).getUncachedKeyRing();
|
||||
|
||||
// Merge data from new secret ring into old one
|
||||
log(LogType.MSG_IS_MERGE_SECRET);
|
||||
secretRing = secretRing.merge(oldSecretRing, mLog, mIndent);
|
||||
|
||||
// If this is null, there is an error in the log so we can just return
|
||||
@ -875,6 +878,7 @@ public class ProviderHelper {
|
||||
UncachedKeyRing oldPublicRing = getCanonicalizedPublicKeyRing(masterKeyId).getUncachedKeyRing();
|
||||
|
||||
// Merge data from new secret ring into public one
|
||||
log(LogType.MSG_IS_MERGE_PUBLIC);
|
||||
publicRing = oldPublicRing.merge(secretRing, mLog, mIndent);
|
||||
if (publicRing == null) {
|
||||
return new SaveKeyringResult(SaveKeyringResult.RESULT_ERROR, mLog, null);
|
||||
|
@ -643,6 +643,8 @@
|
||||
<string name="msg_ip_master_flags_xxsx">"Master flags: sign"</string>
|
||||
<string name="msg_ip_master_flags_xxxa">"Master flags: authenticate"</string>
|
||||
<string name="msg_ip_master_flags_xxxx">"Master flags: none"</string>
|
||||
<string name="msg_ip_merge_public">"Merging new data into public keyring"</string>
|
||||
<string name="msg_ip_merge_secret">"Merging new data into secret keyring"</string>
|
||||
<string name="msg_ip_subkey">"Processing subkey %s"</string>
|
||||
<string name="msg_ip_subkey_expired">"Subkey expired on %s"</string>
|
||||
<string name="msg_ip_subkey_expires">"Subkey expires on %s"</string>
|
||||
@ -693,6 +695,8 @@
|
||||
<string name="msg_is_db_exception">"Database error!"</string>
|
||||
<string name="msg_is_importing_subkeys">"Processing secret subkeys"</string>
|
||||
<string name="msg_is_error_io_exc">"Error encoding keyring"</string>
|
||||
<string name="msg_is_merge_public">"Merging new data into public keyring"</string>
|
||||
<string name="msg_is_merge_secret">"Merging new data into secret keyring"</string>
|
||||
<string name="msg_is_pubring_generate">"Generating public keyring from secret keyring"</string>
|
||||
<string name="msg_is_subkey_nonexistent">"Subkey %s unavailable in secret key"</string>
|
||||
<string name="msg_is_subkey_ok">"Marked secret subkey %s as available"</string>
|
||||
@ -955,7 +959,7 @@
|
||||
<string name="msg_import_keyserver">"Using keyserver %s"</string>
|
||||
<string name="msg_import_fingerprint_error">"Fingerprint of fetched key didn't match expected!"</string>
|
||||
<string name="msg_import_fingerprint_ok">"Fingerprint check OK"</string>
|
||||
<string name="msg_import_merge">"Merging keys…"</string>
|
||||
<string name="msg_import_merge">"Merging keyring data from keybase and keyserver"</string>
|
||||
<string name="msg_import_error">"Import operation failed!"</string>
|
||||
<string name="msg_import_partial">"Import operation successful, with errors!"</string>
|
||||
<string name="msg_import_success">"Import operation successful"</string>
|
||||
|
Loading…
Reference in New Issue
Block a user