summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/Provider.java5
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderManager.java3
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EIP.java1
3 files changed, 6 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/Provider.java b/app/src/main/java/se/leap/bitmaskclient/Provider.java
index f22a4bfb..d7ff6633 100644
--- a/app/src/main/java/se/leap/bitmaskclient/Provider.java
+++ b/app/src/main/java/se/leap/bitmaskclient/Provider.java
@@ -35,6 +35,7 @@ import java.util.Locale;
/**
* @author Sean Leonard <meanderingcode@aetherislands.net>
+ * @author Parménides GV <parmegv@sdf.org>
*
*/
public final class Provider implements Parcelable {
@@ -187,7 +188,7 @@ public final class Provider implements Parcelable {
public boolean equals(Object o) {
if(o instanceof Provider) {
Provider p = (Provider) o;
- return p.mainUrl().equals(mainUrl());
+ return p.mainUrl().getHost().equals(mainUrl().getHost());
} else return false;
}
@@ -203,6 +204,6 @@ public final class Provider implements Parcelable {
@Override
public int hashCode() {
- return main_url.hashCode();
+ return mainUrl().getHost().hashCode();
}
}
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java b/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java
index 911144f7..69bd7c1e 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java
@@ -136,7 +136,8 @@ public class ProviderManager implements AdapteeCollection<Provider> {
@Override
public void add(Provider element) {
- custom_providers.add(element);
+ if(!default_providers.contains(element))
+ custom_providers.add(element);
}
@Override
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
index 0713e521..7db35c17 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
@@ -195,6 +195,7 @@ public final class EIP extends IntentService {
private void deleteAllVpnProfiles() {
Collection<VpnProfile> profiles = profile_manager.getProfiles();
profiles.removeAll(profiles);
+ gateways.clear();
}
/**