aboutsummaryrefslogtreecommitdiffstats
path: root/org_apg_integration_lib
diff options
context:
space:
mode:
authorDominik <dominik@dominikschuermann.de>2012-04-12 19:44:00 +0200
committerDominik <dominik@dominikschuermann.de>2012-06-13 19:28:22 +0300
commit2008c2608e3bc1d9a84f276d756f86d8c18b6182 (patch)
tree5220ca8424f9c0834ea8743db18e77b94650a39e /org_apg_integration_lib
parent1a33f4d886ce45596dd7f6dfc3356fe32ec71c1c (diff)
downloadopen-keychain-2008c2608e3bc1d9a84f276d756f86d8c18b6182.tar.gz
open-keychain-2008c2608e3bc1d9a84f276d756f86d8c18b6182.tar.bz2
open-keychain-2008c2608e3bc1d9a84f276d756f86d8c18b6182.zip
started reworking the key creation
Diffstat (limited to 'org_apg_integration_lib')
-rw-r--r--org_apg_integration_lib/src/org/apg/integration/ApgIntentHelper.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/org_apg_integration_lib/src/org/apg/integration/ApgIntentHelper.java b/org_apg_integration_lib/src/org/apg/integration/ApgIntentHelper.java
index a03e74d2b..8c4c0a538 100644
--- a/org_apg_integration_lib/src/org/apg/integration/ApgIntentHelper.java
+++ b/org_apg_integration_lib/src/org/apg/integration/ApgIntentHelper.java
@@ -40,7 +40,7 @@ public class ApgIntentHelper {
*
* @param userIds
* value to specify prefilled values for user that should be created
- * @return true when user presses save, false when user presses cancel
+ * @return true when activity was found and executed successfully
*/
public boolean createNewKey(String userIds) {
Intent intent = new Intent(Constants.Intent.EDIT_KEY);
@@ -60,7 +60,7 @@ public class ApgIntentHelper {
/**
* Opens APG activity to create new key
*
- * @return true when user presses save, false when user presses cancel
+ * @return true when activity was found and executed successfully
*/
public boolean createNewKey() {
return createNewKey(null);
@@ -70,7 +70,7 @@ public class ApgIntentHelper {
* Opens APG activity to edit already existing key based on keyId
*
* @param keyId
- * @return true when user presses save, false when user presses cancel
+ * @return true when activity was found and executed successfully
*/
public boolean editKey(long keyId) {
Intent intent = new Intent(Constants.Intent.EDIT_KEY);
@@ -88,7 +88,7 @@ public class ApgIntentHelper {
/**
* Opens APG activity to select the signature key.
*
- * @return true when user presses okay, false when user presses cancel
+ * @return true when activity was found and executed successfully
*/
public boolean selectSecretKey() {
Intent intent = new Intent(Constants.Intent.SELECT_SECRET_KEY);
@@ -112,7 +112,7 @@ public class ApgIntentHelper {
* long[] that holds the ids of the encryption keys
* @param signatureKeyId
* id of the signature key
- * @return
+ * @return true when activity was found and executed successfully
*/
public boolean encrypt(String data, long[] encryptionKeyIds, long signatureKeyId) {
Intent intent = new Intent(Constants.Intent.ENCRYPT_AND_RETURN);
@@ -136,7 +136,7 @@ public class ApgIntentHelper {
* @param activity
* @param data
* @param pgpData
- * @return success or failure
+ * @return true when activity was found and executed successfully
*/
public boolean decrypt(String data) {
Intent intent = new Intent(Constants.Intent.DECRYPT_AND_RETURN);
@@ -168,6 +168,7 @@ public class ApgIntentHelper {
switch (requestCode) {
case Constants.SELECT_SECRET_KEY:
if (resultCode != Activity.RESULT_OK || data == null) {
+ // user canceled!
break;
}
apgData.setSignatureKeyId(data.getLongExtra(Constants.EXTRA_KEY_ID, 0));
@@ -225,7 +226,7 @@ public class ApgIntentHelper {
*
* @param emails
* The emails that should be used for preselection.
- * @return false when activity could not be found!
+ * @return true when activity was found and executed successfully
*/
public boolean selectEncryptionKeys(String emails) {
return selectEncryptionKeys(emails, null);
@@ -238,7 +239,7 @@ public class ApgIntentHelper {
* The emails that should be used for preselection.
* @param apgData
* ApgData with encryption keys and signature keys preselected
- * @return false when activity could not be found!
+ * @return true when activity was found and executed successfully
*/
public boolean selectEncryptionKeys(String emails, ApgData apgData) {
Intent intent = new Intent(Constants.Intent.SELECT_PUBLIC_KEYS);