From 9e6bf2abbb1395798c7b6957b193d738940a2b57 Mon Sep 17 00:00:00 2001 From: Thialfihar Date: Tue, 29 Apr 2014 18:44:44 +0200 Subject: Rename ProgressDialogUpdater to Progressable Also fix some inconsistent usages of "progress", now using "progressable" in all builders. --- .../java/org/sufficientlysecure/keychain/pgp/PgpHelper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpHelper.java') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpHelper.java index 692764393..013361782 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpHelper.java @@ -24,8 +24,8 @@ import android.content.pm.PackageManager.NameNotFoundException; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.R; +import org.sufficientlysecure.keychain.pgp.Progressable; import org.sufficientlysecure.keychain.util.Log; -import org.sufficientlysecure.keychain.util.ProgressDialogUpdater; import java.io.File; import java.io.IOException; @@ -140,11 +140,11 @@ public class PgpHelper { * TODO: Does this really help on flash storage? * * @param context - * @param progress + * @param progressable * @param file * @throws IOException */ - public static void deleteFileSecurely(Context context, ProgressDialogUpdater progress, File file) + public static void deleteFileSecurely(Context context, Progressable progressable, File file) throws IOException { long length = file.length(); SecureRandom random = new SecureRandom(); @@ -155,8 +155,8 @@ public class PgpHelper { int pos = 0; String msg = context.getString(R.string.progress_deleting_securely, file.getName()); while (pos < length) { - if (progress != null) { - progress.setProgress(msg, (int) (100 * pos / length), 100); + if (progressable != null) { + progressable.setProgress(msg, (int) (100 * pos / length), 100); } random.nextBytes(data); raf.write(data); -- cgit v1.2.3