diff options
author | cyBerta <cyberta@riseup.net> | 2022-08-10 12:48:48 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2022-08-10 12:48:48 +0200 |
commit | 7445bdd71ec3dff82459790cab082056d37e016f (patch) | |
tree | 659bf7bc84ee90a03fe796e452903aae433f559b /app/src/main/java/se/leap | |
parent | f1d1cc2183b6af860194dcfd605afade6a992f86 (diff) |
reset provider details on next stable release
Diffstat (limited to 'app/src/main/java/se/leap')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java | 19 | ||||
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/models/FeatureVersionCode.java | 4 |
2 files changed, 7 insertions, 16 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 f4dbd6bd..8d11105f 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/StartActivity.java @@ -157,21 +157,12 @@ public class StartActivity extends Activity{ } } - if (hasNewFeature(FeatureVersionCode.CALYX_PROVIDER_LILYPAD_UPDATE) && ( + if ((hasNewFeature(FeatureVersionCode.CALYX_PROVIDER_LILYPAD_UPDATE) && ( getPackageName().equals("org.calyxinstitute.vpn") || - ProviderObservable.getInstance().getCurrentProvider().getDomain().equals("calyx.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()); - } - } - - if (hasNewFeature(FeatureVersionCode.RISEUP_PROVIDER_LILYPAD_UPDATE) && ( - getPackageName().equals("se.leap.riseupvpn") || - ProviderObservable.getInstance().getCurrentProvider().getDomain().equals("riseup.net"))) { + ProviderObservable.getInstance().getCurrentProvider().getDomain().equals("calyx.net"))) || + 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()) { 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 9f813415..f7251acb 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 @@ -3,6 +3,6 @@ package se.leap.bitmaskclient.base.models; 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; + int CALYX_PROVIDER_LILYPAD_UPDATE = 165000; + int RISEUP_PROVIDER_LILYPAD_UPDATE = 165000; } |