Hans-Christoph Steiner 2019-05-16 19:00:53 +02:00
parent 289976667d
commit e98393f092
2 changed files with 14 additions and 0 deletions

View File

@ -52,6 +52,7 @@
android:label="@string/swap"
android:name=".views.swap.SwapWorkflowActivity"
android:parentActivityName=".views.main.MainActivity"
android:launchMode="singleTask"
android:theme="@style/SwapTheme.Wizard"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden">

View File

@ -111,6 +111,7 @@ public class SwapWorkflowActivity extends AppCompatActivity {
private Toolbar toolbar;
private SwapView currentView;
private boolean hasPreparedLocalRepo;
private boolean newIntent;
private NewRepoConfig confirmSwapConfig;
private LocalBroadcastManager localBroadcastManager;
private WifiManager wifiManager;
@ -346,6 +347,11 @@ public class SwapWorkflowActivity extends AppCompatActivity {
new IntentFilter(UpdateService.LOCAL_ACTION_STATUS));
checkIncomingIntent();
if (newIntent) {
showRelevantView();
newIntent = false;
}
}
@Override
@ -357,6 +363,13 @@ public class SwapWorkflowActivity extends AppCompatActivity {
localBroadcastManager.unregisterReceiver(repoUpdateReceiver);
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
newIntent = true;
}
/**
* Check whether incoming {@link Intent} is a swap repo, and ensure that
* it is a valid swap URL. The hostname can only be either an IP or