aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain
diff options
context:
space:
mode:
Diffstat (limited to 'OpenKeychain')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java58
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;
- }
- }
- }
-
}