From 72b899fa798bc3bd9154662e51f28195d831b9fc Mon Sep 17 00:00:00 2001 From: Thialfihar Date: Wed, 2 Jun 2010 10:20:41 +0000 Subject: [PATCH] by default show the undecrypted block without line wrapping, just feels less messy, switch after decryption --- res/layout/decrypt.xml | 1 + src/org/thialfihar/android/apg/DecryptActivity.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/res/layout/decrypt.xml b/res/layout/decrypt.xml index 03e2f6311..41bbee479 100644 --- a/res/layout/decrypt.xml +++ b/res/layout/decrypt.xml @@ -77,6 +77,7 @@ diff --git a/src/org/thialfihar/android/apg/DecryptActivity.java b/src/org/thialfihar/android/apg/DecryptActivity.java index 66679884a..34970f7a5 100644 --- a/src/org/thialfihar/android/apg/DecryptActivity.java +++ b/src/org/thialfihar/android/apg/DecryptActivity.java @@ -171,7 +171,7 @@ public class DecryptActivity extends BaseActivity { byteOut.write(bytes, 0, length); } byteOut.close(); - String data = Strings.fromUTF8ByteArray(byteOut.toByteArray()); + String data = new String(byteOut.toByteArray()); mMessage.setText(data); } catch (FileNotFoundException e) { // ignore, then @@ -542,8 +542,10 @@ public class DecryptActivity extends BaseActivity { Toast.makeText(this, R.string.decryptionSuccessful, Toast.LENGTH_SHORT).show(); switch (mDecryptTarget) { case Id.target.message: { - String decryptedMessage = Strings.fromUTF8ByteArray(data.getByteArray(Apg.EXTRA_DECRYPTED_MESSAGE)); + String decryptedMessage = + new String(data.getByteArray(Apg.EXTRA_DECRYPTED_MESSAGE)); mMessage.setText(decryptedMessage); + mMessage.setHorizontallyScrolling(false); mReplyButton.setVisibility(View.VISIBLE); break; }