aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain
diff options
context:
space:
mode:
authormar-v-in <github@rvin.mooo.com>2014-08-01 10:32:20 +0200
committermar-v-in <github@rvin.mooo.com>2014-08-01 10:32:20 +0200
commit0568632f32a695e3b02a0b499708d72edb64647d (patch)
treea1295af03b70796228839ef05520c76914748d4b /OpenKeychain
parent00f5352ddc90ab05f3d1a44534e44b015e071e18 (diff)
parentacbf2a18617eea73924dd109e09189420d9876fe (diff)
downloadopen-keychain-0568632f32a695e3b02a0b499708d72edb64647d.tar.gz
open-keychain-0568632f32a695e3b02a0b499708d72edb64647d.tar.bz2
open-keychain-0568632f32a695e3b02a0b499708d72edb64647d.zip
Merge branch 'master' into improve-file-more
Diffstat (limited to 'OpenKeychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java22
-rw-r--r--OpenKeychain/src/main/res/values/strings.xml2
2 files changed, 15 insertions, 9 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
index 89d396b0d..804a27c92 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java
@@ -140,6 +140,9 @@ public class KeychainIntentService extends IntentService
// delete file securely
public static final String DELETE_FILE = "deleteFile";
+ // import key
+ public static final String IMPORT_KEY_LIST = "import_key_list";
+
// export key
public static final String EXPORT_OUTPUT_STREAM = "export_output_stream";
public static final String EXPORT_FILENAME = "export_filename";
@@ -395,9 +398,15 @@ public class KeychainIntentService extends IntentService
}
} else if (ACTION_IMPORT_KEYRING.equals(action)) {
try {
- // get entries from cached file
- FileImportCache cache = new FileImportCache(this);
- List<ParcelableKeyRing> entries = cache.readCache();
+ List<ParcelableKeyRing> entries;
+ if (data.containsKey(IMPORT_KEY_LIST)) {
+ // get entries from intent
+ entries = data.getParcelableArrayList(IMPORT_KEY_LIST);
+ } else {
+ // get entries from cached file
+ FileImportCache cache = new FileImportCache(this);
+ entries = cache.readCache();
+ }
PgpImportExport pgpImportExport = new PgpImportExport(this, this);
ImportKeyResult result = pgpImportExport.importKeyRings(entries);
@@ -535,12 +544,9 @@ public class KeychainIntentService extends IntentService
Intent importIntent = new Intent(this, KeychainIntentService.class);
importIntent.setAction(ACTION_IMPORT_KEYRING);
-
- // TODO: don't use FileImportCache
- // externalize import key into function
- FileImportCache cache = new FileImportCache(this);
- cache.writeCache(keyRings);
Bundle importData = new Bundle();
+ // This is not going through binder, nothing to fear of
+ importData.putParcelableArrayList(IMPORT_KEY_LIST, keyRings);
importIntent.putExtra(EXTRA_DATA, importData);
importIntent.putExtra(EXTRA_MESSENGER, mMessenger);
diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml
index bed264952..7ad2cebdf 100644
--- a/OpenKeychain/src/main/res/values/strings.xml
+++ b/OpenKeychain/src/main/res/values/strings.xml
@@ -516,7 +516,7 @@
<string name="create_key_upload">Upload key to keyserver</string>
<string name="create_key_empty">This field is required</string>
<string name="create_key_passphrases_not_equal">Passphrases do not match</string>
- <string name="create_key_final_text">You entered the following credentials:</string>
+ <string name="create_key_final_text">You entered the following identity:</string>
<string name="create_key_final_robot_text">Creating a key may take a while, have a cup of coffee in the meantime…\n(3 subkeys, RSA, 4096 bit)</string>
<string name="create_key_text">Enter your full name, email address, and choose a passhrase.</string>
<string name="create_key_hint_full_name">Full Name, e.g. Max Mustermann</string>