fix progress for decrypt

This commit is contained in:
Vincent Breitmoser
2015-06-10 17:39:06 +02:00
parent 1697e22d19
commit a48de4cd84
3 changed files with 37 additions and 14 deletions

View File

@@ -188,14 +188,9 @@ public class DecryptFilesListFragment
}
@Override
protected void onCryptoSetProgress(String msg, int progress, int max) {
protected boolean onCryptoSetProgress(String msg, int progress, int max) {
mAdapter.setProgress(mCurrentInputUri, progress, max, msg);
}
@Override
public void showProgressFragment(
String progressDialogMessage, int progressDialogStyle, boolean cancelable) {
// progress shown inline, so never mind
return true;
}
@Override

View File

@@ -155,6 +155,14 @@ public abstract class CryptoOperationFragment <T extends Parcelable, S extends O
onHandleResult(result);
}
}
@Override
protected void onSetProgress(String msg, int progress, int max) {
// allow handling of progress in fragment, or delegate upwards
if ( ! onCryptoSetProgress(msg, progress, max)) {
super.onSetProgress(msg, progress, max);
}
}
};
// Create a new Messenger for the communication back
@@ -213,4 +221,8 @@ public abstract class CryptoOperationFragment <T extends Parcelable, S extends O
}
protected boolean onCryptoSetProgress(String msg, int progress, int max) {
return false;
}
}