diff options
Diffstat (limited to 'OpenKeychain/src/main')
4 files changed, 17 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java index aa360609f..21d94084a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/results/OperationResult.java @@ -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), diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java index a3ddd5325..a1479b0c6 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java @@ -787,8 +787,9 @@ 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())); + // This is logged in the calling method to provide more meta info + // log.add(isSecret() ? LogType.MSG_MG_SECRET : LogType.MSG_MG_PUBLIC, + // indent, KeyFormattingUtils.convertKeyIdToHex(getMasterKeyId())); indent += 1; long masterKeyId = other.getMasterKeyId(); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java index 15e546f5a..c28ebde8d 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java @@ -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); diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index 87c0acd6a..9ce1d0868 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -638,6 +638,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> @@ -688,6 +690,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> @@ -762,7 +766,7 @@ <string name="msg_mg_secret">"Merging into secret keyring %s"</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> + <string name="msg_mg_unchanged">"Nothing to merge"</string> <!-- createSecretKeyRing --> <string name="msg_cr">"Generating new master key"</string> @@ -950,7 +954,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 retrieved data"</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> |