diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2016-02-23 16:06:54 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2016-02-23 16:06:54 +0100 |
commit | 73ce6fc7bb9cd5a024bfe510e862dd9d6af3d2de (patch) | |
tree | 83931e11b862ab69b4d2646d09c346616b262757 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ApiPermissionHelper.java | |
parent | c1d268a5ecbb49a56561bd66c9b2967e282b9071 (diff) | |
download | open-keychain-73ce6fc7bb9cd5a024bfe510e862dd9d6af3d2de.tar.gz open-keychain-73ce6fc7bb9cd5a024bfe510e862dd9d6af3d2de.tar.bz2 open-keychain-73ce6fc7bb9cd5a024bfe510e862dd9d6af3d2de.zip |
Passthrough of data Intent in methods of ApiPendingIntentFactory instead of constructor
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ApiPermissionHelper.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ApiPermissionHelper.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ApiPermissionHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ApiPermissionHelper.java index c08cf99a3..7edd8b2b0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ApiPermissionHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ApiPermissionHelper.java @@ -72,7 +72,7 @@ public class ApiPermissionHelper { * @return null if caller is allowed, or a Bundle with a PendingIntent */ protected Intent isAllowed(Intent data) { - ApiPendingIntentFactory piFactory = new ApiPendingIntentFactory(mContext, data); + ApiPendingIntentFactory piFactory = new ApiPendingIntentFactory(mContext); try { if (isCallerAllowed()) { @@ -95,7 +95,8 @@ public class ApiPermissionHelper { } Log.e(Constants.TAG, "Not allowed to use service! return PendingIntent for registration!"); - PendingIntent pi = piFactory.createRegisterPendingIntent(packageName, packageCertificate); + PendingIntent pi = piFactory.createRegisterPendingIntent(data, + packageName, packageCertificate); // return PendingIntent to be executed by client Intent result = new Intent(); @@ -107,7 +108,7 @@ public class ApiPermissionHelper { } catch (WrongPackageCertificateException e) { Log.e(Constants.TAG, "wrong signature!", e); - PendingIntent pi = piFactory.createErrorPendingIntent(mContext.getString(R.string.api_error_wrong_signature)); + PendingIntent pi = piFactory.createErrorPendingIntent(data, mContext.getString(R.string.api_error_wrong_signature)); // return PendingIntent to be executed by client Intent result = new Intent(); @@ -175,9 +176,10 @@ public class ApiPermissionHelper { String packageName = getCurrentCallingPackage(); Log.d(Constants.TAG, "getCreateAccountIntent accountName: " + accountName); - ApiPendingIntentFactory piFactory = new ApiPendingIntentFactory(mContext, data); + ApiPendingIntentFactory piFactory = new ApiPendingIntentFactory(mContext); - PendingIntent pi = piFactory.createAccountCreationPendingIntent(packageName, accountName); + PendingIntent pi = piFactory.createAccountCreationPendingIntent(data, + packageName, accountName); // return PendingIntent to be executed by client Intent result = new Intent(); |