force message encrypt/decrypt view if the activities are called via *_AND_RETURN Intents

This commit is contained in:
Thialfihar 2010-06-02 15:33:40 +00:00
parent 7193edbba2
commit 2170069d8a
2 changed files with 33 additions and 3 deletions

View File

@ -285,12 +285,25 @@ public class DecryptActivity extends BaseActivity {
});
mReplyButton.setVisibility(View.INVISIBLE);
if (mReturnResult) {
mSourcePrevious.setClickable(false);
mSourcePrevious.setEnabled(false);
mSourcePrevious.setVisibility(View.INVISIBLE);
mSourceNext.setClickable(false);
mSourceNext.setEnabled(false);
mSourceNext.setVisibility(View.INVISIBLE);
mSourceLabel.setClickable(false);
mSourceLabel.setEnabled(false);
}
updateSource();
if (mSource.getCurrentView().getId() == R.id.sourceMessage &&
mMessage.getText().length() > 0) {
mDecryptButton.performClick();
}
updateSource();
}
private void openFile() {

View File

@ -347,6 +347,23 @@ public class EncryptActivity extends BaseActivity {
updateSource();
updateMode();
if (mReturnResult) {
mSourcePrevious.setClickable(false);
mSourcePrevious.setEnabled(false);
mSourcePrevious.setVisibility(View.INVISIBLE);
mSourceNext.setClickable(false);
mSourceNext.setEnabled(false);
mSourceNext.setVisibility(View.INVISIBLE);
mSourceLabel.setClickable(false);
mSourceLabel.setEnabled(false);
mEncryptToClipboardButton.setEnabled(false);
mEncryptToClipboardButton.setVisibility(View.INVISIBLE);
mEncryptButton.setText(R.string.btn_encrypt);
}
if (mMessage.getText().length() > 0 &&
((mEncryptionKeyIds != null &&
mEncryptionKeyIds.length > 0) ||