aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-03-23 15:38:02 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2015-03-23 15:38:02 +0100
commitaa3565b857d088be3d12c1fb9acf052cc6cb7720 (patch)
tree8053f1fbf3a3a2459153f79c10bba312a592f593 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain
parent30711c3fe74a5d1db8209c8725bea7e4a88ca3a8 (diff)
downloadopen-keychain-aa3565b857d088be3d12c1fb9acf052cc6cb7720.tar.gz
open-keychain-aa3565b857d088be3d12c1fb9acf052cc6cb7720.tar.bz2
open-keychain-aa3565b857d088be3d12c1fb9acf052cc6cb7720.zip
Fix passphrase cache not clearing all passphrases
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java
index ee481ad31..93a2bee23 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/PassphraseCacheService.java
@@ -93,7 +93,6 @@ public class PassphraseCacheService extends Service {
public static final String EXTRA_MESSENGER = "messenger";
public static final String EXTRA_USER_ID = "user_id";
- private static final int REQUEST_ID = 0;
private static final long DEFAULT_TTL = 15;
private static final int NOTIFICATION_ID = 1;
@@ -314,7 +313,8 @@ public class PassphraseCacheService extends Service {
private static PendingIntent buildIntent(Context context, long keyId) {
Intent intent = new Intent(BROADCAST_ACTION_PASSPHRASE_CACHE_SERVICE);
intent.putExtra(EXTRA_KEY_ID, keyId);
- return PendingIntent.getBroadcast(context, REQUEST_ID, intent,
+ // request code should be unique for each PendingIntent, thus keyId is used
+ return PendingIntent.getBroadcast(context, (int) keyId, intent,
PendingIntent.FLAG_CANCEL_CURRENT);
}