Use intent data instead of IDs for upload and sign, fixes #205

This commit is contained in:
Dominik Schürmann
2014-01-29 03:24:42 +01:00
parent f276455624
commit ecf6fc26c5
4 changed files with 44 additions and 41 deletions

View File

@@ -156,7 +156,6 @@ public class KeychainIntentService extends IntentService implements ProgressDial
// upload key
public static final String UPLOAD_KEY_SERVER = "upload_key_server";
public static final String UPLOAD_KEY_KEYRING_ROW_ID = "upload_key_ring_id";
// query key
public static final String QUERY_KEY_SERVER = "query_key_server";
@@ -231,6 +230,8 @@ public class KeychainIntentService extends IntentService implements ProgressDial
return;
}
Uri dataUri = intent.getData();
mMessenger = (Messenger) extras.get(EXTRA_MESSENGER);
Bundle data = extras.getBundle(EXTRA_DATA);
@@ -727,14 +728,13 @@ public class KeychainIntentService extends IntentService implements ProgressDial
try {
/* Input */
int keyRingRowId = data.getInt(UPLOAD_KEY_KEYRING_ROW_ID);
String keyServer = data.getString(UPLOAD_KEY_SERVER);
// and dataUri!
/* Operation */
HkpKeyServer server = new HkpKeyServer(keyServer);
PGPPublicKeyRing keyring = ProviderHelper.getPGPPublicKeyRingByRowId(this,
keyRingRowId);
PGPPublicKeyRing keyring = (PGPPublicKeyRing) ProviderHelper.getPGPKeyRing(this, dataUri);
if (keyring != null) {
PgpImportExport pgpImportExport = new PgpImportExport(this, null);