diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-01 23:14:31 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-02-01 23:14:31 +0100 |
commit | 8b11d1f74a67a36e818f531fdaa4783eba0d836f (patch) | |
tree | cde40cd4e7f9b21583af39ab126bb753bc1a7a1e /OpenPGP-Keychain | |
parent | d385f9cce007aa0caf63a5da0696561e5047b2cf (diff) | |
download | open-keychain-8b11d1f74a67a36e818f531fdaa4783eba0d836f.tar.gz open-keychain-8b11d1f74a67a36e818f531fdaa4783eba0d836f.tar.bz2 open-keychain-8b11d1f74a67a36e818f531fdaa4783eba0d836f.zip |
importing progress dialog language fixed
Diffstat (limited to 'OpenPGP-Keychain')
-rw-r--r-- | OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpImportExport.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpImportExport.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpImportExport.java index 0e12a94f4..a7a574ee7 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpImportExport.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpImportExport.java @@ -110,10 +110,11 @@ public class PgpImportExport { /** * Imports keys from given data. If keyIds is given only those are imported */ - public Bundle importKeyRings(List<ImportKeysListEntry> entries) throws PgpGeneralException, PGPException, IOException { + public Bundle importKeyRings(List<ImportKeysListEntry> entries) + throws PgpGeneralException, PGPException, IOException { Bundle returnData = new Bundle(); - updateProgress(R.string.progress_importing, 0, entries.size()); + updateProgress(R.string.progress_importing, 0, 100); int newKeys = 0; int oldKeys = 0; @@ -142,12 +143,12 @@ public class PgpImportExport { } else if (status == Id.return_value.bad) { ++badKeys; } - - position++; - updateProgress(position, entries.size()); } else { Log.e(Constants.TAG, "Object not recognized as PGPKeyRing!"); } + + position++; + updateProgress(position / entries.size() * 100, 100); } } catch (Exception e) { Log.e(Constants.TAG, "Exception on parsing key file!", e); |