add edit key unit test for no-op

This commit is contained in:
Vincent Breitmoser
2015-03-20 18:55:16 +01:00
parent 3e51da3afa
commit 88ca41d555
5 changed files with 17 additions and 0 deletions

View File

@@ -395,6 +395,11 @@ public class PgpKeyOperation {
return new PgpEditKeyResult(PgpEditKeyResult.RESULT_ERROR, log, null);
}
if (saveParcel.isEmpty()) {
log.add(LogType.MSG_MF_ERROR_NOOP, indent);
return new PgpEditKeyResult(PgpEditKeyResult.RESULT_ERROR, log, null);
}
if (isDummy(masterSecretKey) || saveParcel.isRestrictedOnly()) {
log.add(LogType.MSG_MF_RESTRICTED_MODE, indent);
return internalRestricted(sKR, saveParcel, log);