recent 1.0.x changes into trunk

This commit is contained in:
Thialfihar
2010-06-17 13:08:28 +00:00
parent 720e5371e0
commit 865c998abd
4 changed files with 12 additions and 9 deletions

View File

@@ -586,7 +586,7 @@ public class EncryptActivity extends BaseActivity {
} else {
String message = mMessage.getText().toString();
if (signOnly && mReturnResult) {
if (signOnly && !mReturnResult) {
// fix the message a bit, trailing spaces and newlines break stuff,
// because GMail sends as HTML and such things fuck up the signature,
// TODO: things like "<" and ">" also fuck up the signature
@@ -597,6 +597,10 @@ public class EncryptActivity extends BaseActivity {
message = message.replaceFirst("\n*$", "\n");
}
if (signOnly && !message.endsWith("\n")) {
message += '\n';
}
byte[] byteData = Strings.toUTF8ByteArray(message);
in = new ByteArrayInputStream(byteData);
out = new ByteArrayOutputStream();