summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java16
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java3
2 files changed, 2 insertions, 17 deletions
diff --git a/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java b/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java
index 02f76240..67565d70 100644
--- a/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java
+++ b/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java
@@ -50,25 +50,9 @@ public class ProviderListActivity extends ProviderListBaseActivity {
preferences.edit().remove(ProviderItem.DANGER_ON).apply();
}
- /**
- * Open the new provider dialog with data
- */
- public void addAndSelectNewProvider(String mainUrl, boolean danger_on) {
- FragmentTransaction fragment_transaction = fragmentManager.removePreviousFragment(NewProviderDialog.TAG);
-
- DialogFragment newFragment = new NewProviderDialog();
- Bundle data = new Bundle();
- data.putString(Provider.MAIN_URL, mainUrl);
- data.putBoolean(ProviderItem.DANGER_ON, danger_on);
- newFragment.setArguments(data);
- newFragment.show(fragment_transaction, NewProviderDialog.TAG);
- }
-
public void showAndSelectProvider(String provider_main_url, boolean danger_on) {
try {
provider = new Provider(new URL((provider_main_url)));
- adapter.add(provider);
- adapter.saveProviders();
autoSelectProvider(provider, danger_on);
} catch (MalformedURLException e) {
e.printStackTrace();
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java
index e0d6e27d..6a0a1864 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java
@@ -385,7 +385,8 @@ public abstract class ProviderListBaseActivity extends ConfigWizardBaseActivity
Bundle resultData = intent.getParcelableExtra(BROADCAST_RESULT_KEY);
Provider handledProvider = resultData.getParcelable(PROVIDER_KEY);
- if (handledProvider != null && handledProvider.getDomain().equalsIgnoreCase(provider.getDomain())) {
+ if (handledProvider != null && provider != null &&
+ handledProvider.getDomain().equalsIgnoreCase(provider.getDomain())) {
switch (resultCode) {
case PROVIDER_OK:
handleProviderSetUp(handledProvider);