mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-24 01:32:16 -05:00
Revert changes in DecryptFileFragment
This commit is contained in:
parent
11b9ed2b74
commit
9eb65601c4
@ -33,15 +33,12 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.openintents.openpgp.util.OpenPgpApi;
|
|
||||||
import org.sufficientlysecure.keychain.Constants;
|
import org.sufficientlysecure.keychain.Constants;
|
||||||
import org.sufficientlysecure.keychain.R;
|
import org.sufficientlysecure.keychain.R;
|
||||||
import org.sufficientlysecure.keychain.helper.FileHelper;
|
import org.sufficientlysecure.keychain.helper.FileHelper;
|
||||||
import org.sufficientlysecure.keychain.pgp.PgpDecryptVerify;
|
|
||||||
import org.sufficientlysecure.keychain.pgp.PgpDecryptVerifyResult;
|
import org.sufficientlysecure.keychain.pgp.PgpDecryptVerifyResult;
|
||||||
import org.sufficientlysecure.keychain.service.KeychainIntentService;
|
import org.sufficientlysecure.keychain.service.KeychainIntentService;
|
||||||
import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler;
|
import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler;
|
||||||
import org.sufficientlysecure.keychain.service.PassphraseCacheService;
|
|
||||||
import org.sufficientlysecure.keychain.ui.dialog.DeleteFileDialogFragment;
|
import org.sufficientlysecure.keychain.ui.dialog.DeleteFileDialogFragment;
|
||||||
import org.sufficientlysecure.keychain.ui.dialog.PassphraseDialogFragment;
|
import org.sufficientlysecure.keychain.ui.dialog.PassphraseDialogFragment;
|
||||||
import org.sufficientlysecure.keychain.util.Log;
|
import org.sufficientlysecure.keychain.util.Log;
|
||||||
@ -185,20 +182,7 @@ public class DecryptFileFragment extends DecryptFragment {
|
|||||||
returnData.getParcelable(KeychainIntentService.RESULT_DECRYPT_VERIFY_RESULT);
|
returnData.getParcelable(KeychainIntentService.RESULT_DECRYPT_VERIFY_RESULT);
|
||||||
|
|
||||||
if (PgpDecryptVerifyResult.KEY_PASSHRASE_NEEDED == decryptVerifyResult.getStatus()) {
|
if (PgpDecryptVerifyResult.KEY_PASSHRASE_NEEDED == decryptVerifyResult.getStatus()) {
|
||||||
try {
|
|
||||||
// try to get passphrase from cache...
|
|
||||||
String passphrase = PassphraseCacheService.getCachedPassphrase(
|
|
||||||
getActivity(), decryptVerifyResult.getKeyIdPassphraseNeeded());
|
|
||||||
|
|
||||||
if (passphrase != null) {
|
|
||||||
// try again with passphrase from cache
|
|
||||||
decryptOriginalFilename(passphrase);
|
|
||||||
} else {
|
|
||||||
showPassphraseDialogForFilename(decryptVerifyResult.getKeyIdPassphraseNeeded());
|
showPassphraseDialogForFilename(decryptVerifyResult.getKeyIdPassphraseNeeded());
|
||||||
}
|
|
||||||
} catch (PassphraseCacheService.KeyNotFoundException e) {
|
|
||||||
Log.e(Constants.TAG, "PassphraseCacheService.KeyNotFoundException", e);
|
|
||||||
}
|
|
||||||
} else if (PgpDecryptVerifyResult.SYMMETRIC_PASSHRASE_NEEDED ==
|
} else if (PgpDecryptVerifyResult.SYMMETRIC_PASSHRASE_NEEDED ==
|
||||||
decryptVerifyResult.getStatus()) {
|
decryptVerifyResult.getStatus()) {
|
||||||
showPassphraseDialogForFilename(Constants.key.symmetric);
|
showPassphraseDialogForFilename(Constants.key.symmetric);
|
||||||
|
Loading…
Reference in New Issue
Block a user