From 9687e9b1a31b1d84e4049bf0f1c5481fa52a628d Mon Sep 17 00:00:00 2001 From: Thialfihar Date: Sat, 25 Dec 2010 19:24:04 +0000 Subject: [PATCH] auto-click encrypt/decrypt button when using an *_AND_RETURN Intent with EXTRA_DATA or ContentURI Fixes issue 67 --- src/org/thialfihar/android/apg/DecryptActivity.java | 2 +- src/org/thialfihar/android/apg/EncryptActivity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thialfihar/android/apg/DecryptActivity.java b/src/org/thialfihar/android/apg/DecryptActivity.java index b79645d46..576b6d531 100644 --- a/src/org/thialfihar/android/apg/DecryptActivity.java +++ b/src/org/thialfihar/android/apg/DecryptActivity.java @@ -328,7 +328,7 @@ public class DecryptActivity extends BaseActivity { updateSource(); if (mSource.getCurrentView().getId() == R.id.sourceMessage && - (mMessage.getText().length() > 0 || mData != null)) { + (mMessage.getText().length() > 0 || mData != null || mContentUri != null)) { mDecryptButton.performClick(); } } diff --git a/src/org/thialfihar/android/apg/EncryptActivity.java b/src/org/thialfihar/android/apg/EncryptActivity.java index 066b0b483..29af975bf 100644 --- a/src/org/thialfihar/android/apg/EncryptActivity.java +++ b/src/org/thialfihar/android/apg/EncryptActivity.java @@ -394,7 +394,7 @@ public class EncryptActivity extends BaseActivity { updateButtons(); if (mReturnResult && - (mMessage.getText().length() > 0 || mData != null) && + (mMessage.getText().length() > 0 || mData != null || mContentUri != null) && ((mEncryptionKeyIds != null && mEncryptionKeyIds.length > 0) || getSecretKeyId() != 0)) {