diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-15 16:42:08 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-15 16:42:08 +0200 |
commit | 5aebd115d4a7a8ba7d538621bbf9e88ef941f48c (patch) | |
tree | 14398fad82c0d244d19028cafb07ad4234e994b9 /OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java | |
parent | 121f8aaca040cd54d8182f0ab9adba961bdfde6d (diff) | |
download | open-keychain-5aebd115d4a7a8ba7d538621bbf9e88ef941f48c.tar.gz open-keychain-5aebd115d4a7a8ba7d538621bbf9e88ef941f48c.tar.bz2 open-keychain-5aebd115d4a7a8ba7d538621bbf9e88ef941f48c.zip |
Put PgpMain methods in separate opbject classes, handle passphrase dialog in EditKey not in SecretKeyList
Diffstat (limited to 'OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java')
-rw-r--r-- | OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java index 3e4b2bcfb..b9a58a210 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java @@ -31,8 +31,8 @@ import org.sufficientlysecure.keychain.compatibility.ClipboardReflection; import org.sufficientlysecure.keychain.helper.ActionBarHelper; import org.sufficientlysecure.keychain.helper.FileHelper; import org.sufficientlysecure.keychain.helper.Preferences; -import org.sufficientlysecure.keychain.pgp.PgpHelper; -import org.sufficientlysecure.keychain.pgp.PgpMain; +import org.sufficientlysecure.keychain.pgp.PgpKeyHelper; +import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException; import org.sufficientlysecure.keychain.provider.ProviderHelper; import org.sufficientlysecure.keychain.service.KeychainIntentService; import org.sufficientlysecure.keychain.service.KeychainIntentServiceHandler; @@ -302,9 +302,9 @@ public class EncryptActivity extends SherlockFragmentActivity { preselectedSignatureKeyId); PGPSecretKey masterKey = null; if (keyRing != null) { - masterKey = PgpHelper.getMasterKey(keyRing); + masterKey = PgpKeyHelper.getMasterKey(keyRing); if (masterKey != null) { - Vector<PGPSecretKey> signKeys = PgpHelper.getUsableSigningKeys(keyRing); + Vector<PGPSecretKey> signKeys = PgpKeyHelper.getUsableSigningKeys(keyRing); if (signKeys.size() > 0) { mSecretKeyId = masterKey.getKeyID(); } @@ -321,11 +321,11 @@ public class EncryptActivity extends SherlockFragmentActivity { if (keyRing == null) { continue; } - masterKey = PgpHelper.getMasterKey(keyRing); + masterKey = PgpKeyHelper.getMasterKey(keyRing); if (masterKey == null) { continue; } - Vector<PGPPublicKey> encryptKeys = PgpHelper.getUsableEncryptKeys(keyRing); + Vector<PGPPublicKey> encryptKeys = PgpKeyHelper.getUsableEncryptKeys(keyRing); if (encryptKeys.size() == 0) { continue; } @@ -570,7 +570,7 @@ public class EncryptActivity extends SherlockFragmentActivity { EncryptActivity.this, messenger, mSecretKeyId); passphraseDialog.show(getSupportFragmentManager(), "passphraseDialog"); - } catch (PgpMain.PgpGeneralException e) { + } catch (PgpGeneralException e) { Log.d(Constants.TAG, "No passphrase for this secret key, encrypt directly!"); // send message to handler to start encryption directly returnHandler.sendEmptyMessage(PassphraseDialogFragment.MESSAGE_OKAY); @@ -914,9 +914,9 @@ public class EncryptActivity extends SherlockFragmentActivity { PGPSecretKeyRing keyRing = ProviderHelper.getPGPSecretKeyRingByMasterKeyId(this, mSecretKeyId); if (keyRing != null) { - PGPSecretKey key = PgpHelper.getMasterKey(keyRing); + PGPSecretKey key = PgpKeyHelper.getMasterKey(keyRing); if (key != null) { - String userId = PgpHelper.getMainUserIdSafe(this, key); + String userId = PgpKeyHelper.getMainUserIdSafe(this, key); String chunks[] = userId.split(" <", 2); uid = chunks[0]; if (chunks.length > 1) { |