summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java12
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/models/FeatureVersionCode.java1
2 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java b/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java
index 2ccbe514..f4dbd6bd 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java
@@ -169,6 +169,18 @@ public class StartActivity extends Activity{
}
}
+ if (hasNewFeature(FeatureVersionCode.RISEUP_PROVIDER_LILYPAD_UPDATE) && (
+ getPackageName().equals("se.leap.riseupvpn") ||
+ ProviderObservable.getInstance().getCurrentProvider().getDomain().equals("riseup.net"))) {
+ // deletion of current configured provider so that a new provider setup is triggered
+ Provider provider = ProviderObservable.getInstance().getCurrentProvider();
+ if (provider != null && !provider.isDefault()) {
+ PreferenceHelper.deleteProviderDetailsFromPreferences(preferences, provider.getDomain());
+ PreferenceHelper.deleteCurrentProviderDetailsFromPreferences(preferences);
+ ProviderObservable.getInstance().updateProvider(new Provider());
+ }
+ }
+
// always check if manual gateway selection feature switch has been disabled
if (!BuildConfig.allow_manual_gateway_selection && PreferenceHelper.getPreferredCity(this) != null) {
PreferenceHelper.setPreferredCity(this, null);
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/models/FeatureVersionCode.java b/app/src/main/java/se/leap/bitmaskclient/base/models/FeatureVersionCode.java
index 95decb82..9f813415 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/models/FeatureVersionCode.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/models/FeatureVersionCode.java
@@ -4,4 +4,5 @@ public interface FeatureVersionCode {
int RENAMED_EIP_IN_PREFERENCES = 132;
int GEOIP_SERVICE = 148;
int CALYX_PROVIDER_LILYPAD_UPDATE = 163000;
+ int RISEUP_PROVIDER_LILYPAD_UPDATE = 164000;
}