mime: add failure case if openpgp processing fails!

This commit is contained in:
Vincent Breitmoser
2015-09-16 20:48:46 +02:00
parent 01038d6a26
commit 76465fc687
3 changed files with 7 additions and 0 deletions

View File

@@ -91,6 +91,11 @@ public class InputDataOperation extends BaseOperation<InputDataParcel> {
}
log.addByMerge(decryptResult, 2);
if (!decryptResult.success()) {
log.add(LogType.MSG_DATA_ERROR_OPENPGP, 1);
return new InputDataResult(InputDataResult.RESULT_ERROR, log);
}
} else {
currentInputUri = input.getInputUri();
}

View File

@@ -829,6 +829,7 @@ public abstract class OperationResult implements Parcelable {
MSG_DATA (LogLevel.START, R.string.msg_data),
MSG_DATA_OPENPGP (LogLevel.DEBUG, R.string.msg_data_openpgp),
MSG_DATA_ERROR_IO (LogLevel.ERROR, R.string.msg_data_error_io),
MSG_DATA_ERROR_OPENPGP (LogLevel.ERROR, R.string.msg_data_error_openpgp),
MSG_DATA_MIME_ERROR (LogLevel.ERROR, R.string.msg_data_mime_error),
MSG_DATA_MIME_FILENAME (LogLevel.DEBUG, R.string.msg_data_mime_filename),
MSG_DATA_MIME_LENGTH (LogLevel.DEBUG, R.string.msg_data_mime_length),

View File

@@ -1358,6 +1358,7 @@
<string name="msg_data">"Processing input data"</string>
<string name="msg_data_openpgp">"Attempting to process OpenPGP data"</string>
<string name="msg_data_error_io">"Error reading input data!"</string>
<string name="msg_data_error_openpgp">"Error processing OpenPGP data!"</string>
<string name="msg_data_mime_error">"Error parsing MIME data!"</string>
<string name="msg_data_mime_filename">"Filename: '%s'"</string>
<string name="msg_data_mime_length">"Content-Length: %s"</string>