diff options
Diffstat (limited to 'OpenPGP-Keychain/src')
-rw-r--r-- | OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java index 2d112cc72..0a4806239 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java @@ -24,9 +24,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; import org.spongycastle.bcpg.ArmoredOutputStream; import org.spongycastle.openpgp.PGPException; @@ -72,6 +69,12 @@ public class PgpImportExport { } } + public void updateProgress(String message, int current, int total) { + if (mProgress != null) { + mProgress.setProgress(message, current, total); + } + } + public void updateProgress(int current, int total) { if (mProgress != null) { mProgress.setProgress(current, total); @@ -194,11 +197,9 @@ public class PgpImportExport { PGPException, IOException { Bundle returnData = new Bundle(); - if (keyRingMasterKeyIds.size() == 1) { - updateProgress(R.string.progress_exporting_key, 0, 100); - } else { - updateProgress(R.string.progress_exporting_keys, 0, 100); - } + updateProgress( + mContext.getResources().getQuantityString(R.plurals.progress_exporting_key, + keyRingMasterKeyIds.size()), 0, 100); if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { throw new PgpGeneralException( |