aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2016-02-22 15:19:06 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2016-02-22 15:19:06 +0100
commitf54f12c48c71d728f5a0cff7a750b34a345da5cf (patch)
treea4a3a5af9e8df27556fccb8259f7a75c627a2696 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
parent6379ce1faa3a0ebf5b88b5c20fd465119535554c (diff)
downloadopen-keychain-f54f12c48c71d728f5a0cff7a750b34a345da5cf.tar.gz
open-keychain-f54f12c48c71d728f5a0cff7a750b34a345da5cf.tar.bz2
open-keychain-f54f12c48c71d728f5a0cff7a750b34a345da5cf.zip
Extend documentation, proper method naming, use of deprecated method annotation
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
index 7c5351d6a..f898ff2ca 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
@@ -144,7 +144,7 @@ public class OpenPgpService extends Service {
// allow the user to verify pub key selection
ApiPendingIntentFactory piFactory = new ApiPendingIntentFactory(getBaseContext(), data);
- PendingIntent pi = piFactory.selectPublicKey(keyIdsArray, missingEmails,
+ PendingIntent pi = piFactory.createSelectPublicKeyPendingIntent(keyIdsArray, missingEmails,
duplicateEmails, noUserIdsCheck);
// return PendingIntent to be executed by client
@@ -459,7 +459,7 @@ public class OpenPgpService extends Service {
case OpenPgpSignatureResult.RESULT_KEY_MISSING: {
// If signature key is missing we return a PendingIntent to retrieve the key
result.putExtra(OpenPgpApi.RESULT_INTENT,
- piFactory.importFromKeyserver(signatureResult.getKeyId()));
+ piFactory.createImportFromKeyserverPendingIntent(signatureResult.getKeyId()));
break;
}
case OpenPgpSignatureResult.RESULT_VALID_CONFIRMED:
@@ -468,7 +468,7 @@ public class OpenPgpService extends Service {
case OpenPgpSignatureResult.RESULT_INVALID_KEY_EXPIRED:
case OpenPgpSignatureResult.RESULT_INVALID_INSECURE: {
// If signature key is known, return PendingIntent to show key
- result.putExtra(OpenPgpApi.RESULT_INTENT, piFactory.showKey(signatureResult.getKeyId()));
+ result.putExtra(OpenPgpApi.RESULT_INTENT, piFactory.createShowKeyPendingIntent(signatureResult.getKeyId()));
break;
}
default:
@@ -542,7 +542,7 @@ public class OpenPgpService extends Service {
// allow user to select allowed keys
Intent result = new Intent();
String packageName = mApiPermissionHelper.getCurrentCallingPackage();
- result.putExtra(OpenPgpApi.RESULT_INTENT, piFactory.selectAllowedKeys(packageName));
+ result.putExtra(OpenPgpApi.RESULT_INTENT, piFactory.createSelectAllowedKeysPendingIntent(packageName));
result.putExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED);
return result;
}
@@ -597,14 +597,14 @@ public class OpenPgpService extends Service {
}
// also return PendingIntent that opens the key view activity
- result.putExtra(OpenPgpApi.RESULT_INTENT, piFactory.showKey(masterKeyId));
+ result.putExtra(OpenPgpApi.RESULT_INTENT, piFactory.createShowKeyPendingIntent(masterKeyId));
return result;
} catch (ProviderHelper.NotFoundException e) {
// If keys are not in db we return an additional PendingIntent
// to retrieve the missing key
Intent result = new Intent();
- result.putExtra(OpenPgpApi.RESULT_INTENT, piFactory.importFromKeyserver(masterKeyId));
+ result.putExtra(OpenPgpApi.RESULT_INTENT, piFactory.createImportFromKeyserverPendingIntent(masterKeyId));
result.putExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED);
return result;
}
@@ -634,7 +634,7 @@ public class OpenPgpService extends Service {
String preferredUserId = data.getStringExtra(OpenPgpApi.EXTRA_USER_ID);
ApiPendingIntentFactory piFactory = new ApiPendingIntentFactory(getBaseContext(), data);
- PendingIntent pi = piFactory.selectSignKeyId(currentPkg, preferredUserId);
+ PendingIntent pi = piFactory.createSelectSignKeyIdPendingIntent(currentPkg, preferredUserId);
// return PendingIntent to be executed by client
Intent result = new Intent();
@@ -697,7 +697,7 @@ public class OpenPgpService extends Service {
* - has supported API version
* - is allowed to call the service (access has been granted)
*
- * @return null if everything is okay, or a Bundle with an error/PendingIntent
+ * @return null if everything is okay, or a Bundle with an createErrorPendingIntent/PendingIntent
*/
private Intent checkRequirements(Intent data) {
// params Bundle is required!
@@ -760,7 +760,7 @@ public class OpenPgpService extends Service {
try {
return executeInternalWithStreams(data, inputStream, outputStream);
} finally {
- // always close input and output file descriptors even in error cases
+ // always close input and output file descriptors even in createErrorPendingIntent cases
if (inputStream != null) {
try {
inputStream.close();