diff options
author | Thialfihar <thi@thialfihar.org> | 2014-04-29 18:44:44 +0200 |
---|---|---|
committer | Thialfihar <thi@thialfihar.org> | 2014-04-29 18:44:44 +0200 |
commit | 9e6bf2abbb1395798c7b6957b193d738940a2b57 (patch) | |
tree | ff2fac94cc8956954f21bc300041eb2858883cdd /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpHelper.java | |
parent | 6a1832ebaddc37326d35e9e4514510a3691841c7 (diff) | |
download | open-keychain-9e6bf2abbb1395798c7b6957b193d738940a2b57.tar.gz open-keychain-9e6bf2abbb1395798c7b6957b193d738940a2b57.tar.bz2 open-keychain-9e6bf2abbb1395798c7b6957b193d738940a2b57.zip |
Rename ProgressDialogUpdater to Progressable
Also fix some inconsistent usages of "progress", now using
"progressable" in all builders.
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpHelper.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpHelper.java | 10 |
1 files changed, 5 insertions, 5 deletions
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); |