summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-08-07 22:12:28 +0200
committercyBerta <cyberta@riseup.net>2022-08-07 22:12:28 +0200
commit09bde72ed77432a081b3536b92390e3349c8e039 (patch)
treeeefec4a8cf444f16ee1bc53e0fc22d82ed9f4e19 /app/src/main
parenta457170cf50138104b5215d8affae0bc9874867c (diff)
prepare final riseup lilypad transition
Diffstat (limited to 'app/src/main')
-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;
}