From 315f1fa932eea6f7d170f75e90f1eca668635ff2 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Thu, 7 Jan 2016 21:52:49 +1100 Subject: [PATCH] Use a better name than "handled" for swap activity. Before, both the swap activity and the fdroid activity would use the "handled" key to check if an intent had been handled. This caused problems, because by the time we got to handling the add repo intent, it had already been "handled" by the swap activity so we bailed. --- .../org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/F-Droid/src/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java b/F-Droid/src/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java index 5915cab5c..27bd0a276 100644 --- a/F-Droid/src/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java +++ b/F-Droid/src/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java @@ -81,7 +81,7 @@ public class SwapWorkflowActivity extends AppCompatActivity { * Ensure that we don't try to handle specific intents more than once in onResume() * (e.g. the "Do you want to swap back with ..." intent). */ - public static final String EXTRA_HANDLED = "handled"; + public static final String EXTRA_SWAP_INTENT_HANDLED = "swapIntentHandled"; private ViewGroup container; @@ -209,10 +209,10 @@ public class SwapWorkflowActivity extends AppCompatActivity { private void checkIncomingIntent() { Intent intent = getIntent(); - if (intent.getBooleanExtra(EXTRA_CONFIRM, false) && !intent.getBooleanExtra(EXTRA_HANDLED, false)) { + if (intent.getBooleanExtra(EXTRA_CONFIRM, false) && !intent.getBooleanExtra(EXTRA_SWAP_INTENT_HANDLED, false)) { // Storing config in this variable will ensure that when showRelevantView() is next // run, it will show the connect swap view (if the service is available). - intent.putExtra(EXTRA_HANDLED, true); + intent.putExtra(EXTRA_SWAP_INTENT_HANDLED, true); confirmSwapConfig = new NewRepoConfig(this, intent); } }