diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-08 03:12:24 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-08 03:12:24 +0200 |
commit | 4837d4cc5c86a5f5f18cb86300f165cf1b37f4d2 (patch) | |
tree | feeaaa654f24df80453e69a43cff84770c95fd27 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java | |
parent | 15cee8e7e995afe1c435004c3abba521439e4e0b (diff) | |
parent | af546ae10190ac076cd7b091cd064fb8a5c03519 (diff) | |
download | open-keychain-4837d4cc5c86a5f5f18cb86300f165cf1b37f4d2.tar.gz open-keychain-4837d4cc5c86a5f5f18cb86300f165cf1b37f4d2.tar.bz2 open-keychain-4837d4cc5c86a5f5f18cb86300f165cf1b37f4d2.zip |
Merge branch 'master' of github.com:open-keychain/open-keychain
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java | 58 |
1 files changed, 27 insertions, 31 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java index a997dc545..6e41e97a8 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java @@ -225,6 +225,33 @@ public class CreateKeyFinalFragment extends Fragment { } } } + + // handle queued actions + + if (mQueuedFinishResult != null) { + finishWithResult(mQueuedFinishResult); + return; + } + + if (mQueuedDisplayResult != null) { + try { + displayResult(mQueuedDisplayResult); + } finally { + // clear after operation, note that this may drop the operation if it didn't + // work when called from here! + mQueuedDisplayResult = null; + } + } + + if (mQueuedSaveKeyResult != null) { + try { + uploadKey(mQueuedSaveKeyResult); + } finally { + // see above + mQueuedSaveKeyResult = null; + } + } + } private void createKey() { @@ -433,35 +460,4 @@ public class CreateKeyFinalFragment extends Fragment { activity.finish(); } - @Override - public void onAttach(Activity activity) { - super.onAttach(activity); - - // there may be queued actions from when we weren't attached to an activity! - - if (mQueuedFinishResult != null) { - finishWithResult(mQueuedFinishResult); - return; - } - - if (mQueuedDisplayResult != null) { - try { - displayResult(mQueuedDisplayResult); - } finally { - // clear after operation, note that this may drop the operation if it didn't - // work when called from here! - mQueuedDisplayResult = null; - } - } - - if (mQueuedSaveKeyResult != null) { - try { - uploadKey(mQueuedSaveKeyResult); - } finally { - // see above - mQueuedSaveKeyResult = null; - } - } - } - } |