aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/SignEncryptOperation.java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-03-14 21:36:35 +0100
committerDominik Schürmann <dominik@dominikschuermann.de>2015-03-14 21:36:35 +0100
commit8ede97b9ffeae0604c5ed88b2f188cdd0b33c3b4 (patch)
tree4073580053fdd0c0d543d4f54c03bb98652121d0 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/SignEncryptOperation.java
parentafa7790fbd3e1c9e9145e33a4ac0e4ed7967963b (diff)
parentf1b1ecae20edb40a0c9b48009075daf94af51d20 (diff)
downloadopen-keychain-8ede97b9ffeae0604c5ed88b2f188cdd0b33c3b4.tar.gz
open-keychain-8ede97b9ffeae0604c5ed88b2f188cdd0b33c3b4.tar.bz2
open-keychain-8ede97b9ffeae0604c5ed88b2f188cdd0b33c3b4.zip
Merge branch 'development' of github.com:open-keychain/open-keychain into development
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/SignEncryptOperation.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/SignEncryptOperation.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/SignEncryptOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/SignEncryptOperation.java
index e98f6b150..af60ea5ee 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/SignEncryptOperation.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/SignEncryptOperation.java
@@ -48,6 +48,7 @@ public class SignEncryptOperation extends BaseOperation {
byte[] inputBytes = input.getBytes();
byte[] outputBytes = null;
+ int total = inputBytes != null ? 1 : inputUris.size(), count = 0;
ArrayList<PgpSignEncryptResult> results = new ArrayList<>();
do {
@@ -104,7 +105,7 @@ public class SignEncryptOperation extends BaseOperation {
}
PgpSignEncryptOperation op = new PgpSignEncryptOperation(mContext, mProviderHelper,
- new ProgressScaler(), mCancelled);
+ new ProgressScaler(mProgressable, 100 * count / total, 100 * ++count / total, 100), mCancelled);
PgpSignEncryptResult result = op.execute(input, inputData, outStream);
results.add(result);
log.add(result, 2);