aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-04-29 19:50:30 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2014-04-29 19:50:30 +0200
commit5c145cf44decbdb686673a49e28310b6811931f2 (patch)
treeac891321f10d4d85afb019f440c91a4c04239d64 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util
parent30d3c33be971aecaf590b762d2ed45b981fb9096 (diff)
parent9e6bf2abbb1395798c7b6957b193d738940a2b57 (diff)
downloadopen-keychain-5c145cf44decbdb686673a49e28310b6811931f2.tar.gz
open-keychain-5c145cf44decbdb686673a49e28310b6811931f2.tar.bz2
open-keychain-5c145cf44decbdb686673a49e28310b6811931f2.zip
Merge pull request #600 from thi/rename-progressdialogupdater
Rename progressdialogupdater
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ProgressDialogUpdater.java26
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ProgressScaler.java13
2 files changed, 8 insertions, 31 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ProgressDialogUpdater.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ProgressDialogUpdater.java
deleted file mode 100644
index 5f046e4c6..000000000
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ProgressDialogUpdater.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2010-2014 Thialfihar <thi@thialfihar.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package org.sufficientlysecure.keychain.util;
-
-public interface ProgressDialogUpdater {
- void setProgress(String message, int current, int total);
-
- void setProgress(int resourceId, int current, int total);
-
- void setProgress(int current, int total);
-}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ProgressScaler.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ProgressScaler.java
index 23961c05f..5553ea5d2 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ProgressScaler.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ProgressScaler.java
@@ -17,15 +17,18 @@
package org.sufficientlysecure.keychain.util;
-/** This is a simple class that wraps a ProgressDialogUpdater, scaling the progress
+import org.sufficientlysecure.keychain.pgp.Progressable;
+
+/**
+ * This is a simple class that wraps a Progressable, scaling the progress
* values into a specified range.
*/
-public class ProgressScaler implements ProgressDialogUpdater {
+public class ProgressScaler implements Progressable {
- final ProgressDialogUpdater mWrapped;
+ final Progressable mWrapped;
final int mFrom, mTo, mMax;
- public ProgressScaler(ProgressDialogUpdater wrapped, int from, int to, int max) {
+ public ProgressScaler(Progressable wrapped, int from, int to, int max) {
this.mWrapped = wrapped;
this.mFrom = from;
this.mTo = to;
@@ -33,7 +36,7 @@ public class ProgressScaler implements ProgressDialogUpdater {
}
/**
- * Set progressDialogUpdater of ProgressDialog by sending message to handler on UI thread
+ * Set progress of ProgressDialog by sending message to handler on UI thread
*/
public void setProgress(String message, int progress, int max) {
mWrapped.setProgress(message, mFrom + progress * (mTo - mFrom) / max, mMax);