diff options
author | Thialfihar <thialfihar@gmail.com> | 2010-06-02 19:30:27 +0000 |
---|---|---|
committer | Thialfihar <thialfihar@gmail.com> | 2010-06-02 19:30:27 +0000 |
commit | 2f04e7ee0523260eb50e2f843d8d6f0c97373bc5 (patch) | |
tree | 4c4bc2053ff140fb32955422314f0294077848fe /src | |
parent | 9ad474e95b8d5ddf90353122603ad69b7ad432c7 (diff) | |
download | open-keychain-2f04e7ee0523260eb50e2f843d8d6f0c97373bc5.tar.gz open-keychain-2f04e7ee0523260eb50e2f843d8d6f0c97373bc5.tar.bz2 open-keychain-2f04e7ee0523260eb50e2f843d8d6f0c97373bc5.zip |
some small bugfixes
Diffstat (limited to 'src')
-rw-r--r-- | src/org/thialfihar/android/apg/DecryptActivity.java | 4 | ||||
-rw-r--r-- | src/org/thialfihar/android/apg/EncryptActivity.java | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/org/thialfihar/android/apg/DecryptActivity.java b/src/org/thialfihar/android/apg/DecryptActivity.java index a1889ea38..de8dcb3ff 100644 --- a/src/org/thialfihar/android/apg/DecryptActivity.java +++ b/src/org/thialfihar/android/apg/DecryptActivity.java @@ -188,7 +188,7 @@ public class DecryptActivity extends BaseActivity { mMessage.setText(data); } mSubject = extras.getString(Intent.EXTRA_SUBJECT); - if (mSubject.startsWith("Fwd: ")) { + if (mSubject != null && mSubject.startsWith("Fwd: ")) { mSubject = mSubject.substring(5); } } else if (Apg.Intent.DECRYPT.equals(mIntent.getAction())) { @@ -247,8 +247,6 @@ public class DecryptActivity extends BaseActivity { } } } - mReplyTo = extras.getString(Apg.EXTRA_REPLY_TO); - mSubject = extras.getString(Apg.EXTRA_SUBJECT); mReturnResult = true; } diff --git a/src/org/thialfihar/android/apg/EncryptActivity.java b/src/org/thialfihar/android/apg/EncryptActivity.java index 1a1ce7f13..926d79599 100644 --- a/src/org/thialfihar/android/apg/EncryptActivity.java +++ b/src/org/thialfihar/android/apg/EncryptActivity.java @@ -364,7 +364,8 @@ public class EncryptActivity extends BaseActivity { mEncryptButton.setText(R.string.btn_encrypt); } - if (mMessage.getText().length() > 0 && + if (mReturnResult && + mMessage.getText().length() > 0 && ((mEncryptionKeyIds != null && mEncryptionKeyIds.length > 0) || getSecretKeyId() != 0)) { @@ -760,9 +761,9 @@ public class EncryptActivity extends BaseActivity { getString(R.string.errorMessage, error), Toast.LENGTH_SHORT).show(); return; } - String message = Strings.fromUTF8ByteArray(data.getByteArray(Apg.EXTRA_ENCRYPTED_MESSAGE)); switch (mEncryptTarget) { case Id.target.clipboard: { + String message = new String(data.getByteArray(Apg.EXTRA_ENCRYPTED_MESSAGE)); ClipboardManager clip = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); clip.setText(message); Toast.makeText(this, R.string.encryptionToClipboardSuccessful, @@ -779,6 +780,7 @@ public class EncryptActivity extends BaseActivity { return; } + String message = new String(data.getByteArray(Apg.EXTRA_ENCRYPTED_MESSAGE)); Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("text/plain; charset=utf-8"); emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, message); |