ditch ThreadPoolExecutor for AsyncTask

This commit is contained in:
Vincent Breitmoser
2018-07-17 14:01:17 +02:00
parent 2c8e219aa8
commit 9e079329d5
13 changed files with 321 additions and 504 deletions

View File

@@ -222,8 +222,7 @@ public class BackupOperation extends BaseOperation<BackupKeyringParcel> {
}
int numKeys = unifiedKeyInfos.size();
updateProgress(mContext.getResources().getQuantityString(R.plurals.progress_exporting_key, numKeys),
0, numKeys);
updateProgress(numKeys == 1 ? R.string.progress_exporting_key : R.string.progress_exporting_key, 0, numKeys);
// For each public masterKey id
for (UnifiedKeyInfo keyInfo : unifiedKeyInfos) {

View File

@@ -88,12 +88,6 @@ public abstract class BaseOperation<T extends Parcelable> implements PassphraseC
}
}
public void updateProgress(String message, int current, int total) {
if (mProgressable != null) {
mProgressable.setProgress(message, current, total);
}
}
public void updateProgress(int current, int total) {
if (mProgressable != null) {
mProgressable.setProgress(current, total);