diff options
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java index 53ab33dc5..3c837206d 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/base/CryptoOperationFragment.java @@ -84,15 +84,25 @@ public abstract class CryptoOperationFragment<T extends Parcelable, S extends Op } protected void onCryptoOperationError(S result) { + onCryptoOperationResult(result); result.createNotify(getActivity()).show(); } protected void onCryptoOperationCancelled() { } - abstract protected void onCryptoOperationSuccess(S result); + protected void onCryptoOperationSuccess(S result) { + onCryptoOperationResult(result); + } + /** + * + * To be overriden by subclasses, if desired. Provides a way to access the method by the + * same name in CryptoOperationHelper, if super.onCryptoOperationSuccess and + * super.onCryptoOperationError are called at the start of the respective functions in the + * subclass overriding them + * @param result + */ protected void onCryptoOperationResult(S result) { - mOperationHelper.onCryptoOperationResult(result); } } |