more language fixes and cleanup

This commit is contained in:
Dominik Schürmann
2014-01-19 16:06:23 +01:00
parent f4a9688bd9
commit 1b1927883b
16 changed files with 84 additions and 122 deletions

View File

@@ -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(