importing progress dialog language fixed

This commit is contained in:
Dominik Schürmann 2014-02-01 23:14:31 +01:00
parent d385f9cce0
commit 8b11d1f74a

View File

@ -110,10 +110,11 @@ public class PgpImportExport {
/** /**
* Imports keys from given data. If keyIds is given only those are imported * 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(); Bundle returnData = new Bundle();
updateProgress(R.string.progress_importing, 0, entries.size()); updateProgress(R.string.progress_importing, 0, 100);
int newKeys = 0; int newKeys = 0;
int oldKeys = 0; int oldKeys = 0;
@ -142,12 +143,12 @@ public class PgpImportExport {
} else if (status == Id.return_value.bad) { } else if (status == Id.return_value.bad) {
++badKeys; ++badKeys;
} }
position++;
updateProgress(position, entries.size());
} else { } else {
Log.e(Constants.TAG, "Object not recognized as PGPKeyRing!"); Log.e(Constants.TAG, "Object not recognized as PGPKeyRing!");
} }
position++;
updateProgress(position / entries.size() * 100, 100);
} }
} catch (Exception e) { } catch (Exception e) {
Log.e(Constants.TAG, "Exception on parsing key file!", e); Log.e(Constants.TAG, "Exception on parsing key file!", e);