Fallback if no primary user id exists

This commit is contained in:
Dominik Schürmann
2014-07-16 00:22:45 +02:00
parent 64b87f75be
commit d3c54d5f12
11 changed files with 34 additions and 13 deletions

View File

@@ -351,7 +351,7 @@ public class KeychainIntentService extends IntentService
// cache new passphrase
if (saveParcel.mNewPassphrase != null) {
PassphraseCacheService.addCachedPassphrase(this, ring.getMasterKeyId(),
saveParcel.mNewPassphrase, ring.getPublicKey().getPrimaryUserId());
saveParcel.mNewPassphrase, ring.getPublicKey().getPrimaryUserIdWithFallback());
}
} catch (ProviderHelper.NotFoundException e) {
sendErrorToHandler(e);

View File

@@ -191,7 +191,7 @@ public class PassphraseCacheService extends Service {
Log.d(Constants.TAG, "Key has no passphrase! Caches and returns empty passphrase!");
try {
addCachedPassphrase(this, keyId, "", key.getPrimaryUserId());
addCachedPassphrase(this, keyId, "", key.getPrimaryUserIdWithFallback());
} catch (PgpGeneralException e) {
Log.d(Constants.TAG, "PgpGeneralException occured");
}