diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-04-01 00:38:01 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-04-01 00:39:32 +0200 |
commit | ad69622b6983d139e2cef1380f502edef19d2180 (patch) | |
tree | 17d06ee5ce8a683503b3ecc9e56f265c4f99324b /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFilesFragment.java | |
parent | cc44ff1a8b3b51331023ef738ccd28bece32da40 (diff) | |
download | open-keychain-ad69622b6983d139e2cef1380f502edef19d2180.tar.gz open-keychain-ad69622b6983d139e2cef1380f502edef19d2180.tar.bz2 open-keychain-ad69622b6983d139e2cef1380f502edef19d2180.zip |
fix Decrypt*Fragment for RequiredInputParcel (except decryptOriginalFilename)
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFilesFragment.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFilesFragment.java | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFilesFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFilesFragment.java index cd66902ba..766e65e8b 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFilesFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFilesFragment.java @@ -93,9 +93,6 @@ public class DecryptFilesFragment extends DecryptFragment { mDecryptButton = view.findViewById(R.id.decrypt_file_action_decrypt); view.findViewById(R.id.decrypt_file_browse).setOnClickListener(new View.OnClickListener() { public void onClick(View v) { - // reset state - mPassphrase = null; - mNfcDecryptedSessionKey = null; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { FileHelper.openDocument(DecryptFilesFragment.this, "*/*", REQUEST_CODE_INPUT); } else { @@ -207,8 +204,7 @@ public class DecryptFilesFragment extends DecryptFragment { data.putInt(KeychainIntentService.TARGET, IOType.URI.ordinal()); data.putParcelable(KeychainIntentService.ENCRYPT_DECRYPT_OUTPUT_URI, mOutputUri); -// data.putParcelable(KeychainIntentService.DECRYPT_PASSPHRASE, mPassphrase); -// data.putByteArray(KeychainIntentService.DECRYPT_NFC_DECRYPTED_SESSION_KEY, mNfcDecryptedSessionKey); + data.putParcelable(KeychainIntentService.EXTRA_CRYPTO_INPUT, cryptoInput); intent.putExtra(KeychainIntentService.EXTRA_DATA, data); @@ -235,20 +231,6 @@ public class DecryptFilesFragment extends DecryptFragment { DecryptVerifyResult pgpResult = returnData.getParcelable(DecryptVerifyResult.EXTRA_RESULT); -// if (pgpResult.isPending()) { -// if ((pgpResult.getResult() & DecryptVerifyResult.RESULT_PENDING_ASYM_PASSPHRASE) == -// DecryptVerifyResult.RESULT_PENDING_ASYM_PASSPHRASE) { -// startPassphraseDialog(pgpResult.getKeyIdPassphraseNeeded()); -// } else if ((pgpResult.getResult() & DecryptVerifyResult.RESULT_PENDING_SYM_PASSPHRASE) == -// DecryptVerifyResult.RESULT_PENDING_SYM_PASSPHRASE) { -// startPassphraseDialog(Constants.key.symmetric); -// } else if ((pgpResult.getResult() & DecryptVerifyResult.RESULT_PENDING_NFC) == -// DecryptVerifyResult.RESULT_PENDING_NFC) { -// startNfcDecrypt(pgpResult.getNfcSubKeyId(), pgpResult.getNfcPassphrase(), pgpResult.getNfcEncryptedSessionKey()); -// } else { -// throw new RuntimeException("Unhandled pending result!"); -// } - if (pgpResult.success()) { switch (mCurrentCryptoOperation) { @@ -304,22 +286,6 @@ public class DecryptFilesFragment extends DecryptFragment { @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { switch (requestCode) { -// case REQUEST_CODE_PASSPHRASE: { -// if (resultCode == Activity.RESULT_OK && data != null) { -// mPassphrase = data.getParcelableExtra(PassphraseDialogActivity.MESSAGE_DATA_PASSPHRASE); -//// decryptOriginalFilename(); -// } -// return; -// } -// -// case REQUEST_CODE_NFC_DECRYPT: { -// if (resultCode == Activity.RESULT_OK && data != null) { -// mNfcDecryptedSessionKey = data.getByteArrayExtra(OpenPgpApi.EXTRA_NFC_DECRYPTED_SESSION_KEY); -//// decryptOriginalFilename(); -// } -// return; -// } - case REQUEST_CODE_INPUT: { if (resultCode == Activity.RESULT_OK && data != null) { setInputUri(data.getData()); |