From 7445bdd71ec3dff82459790cab082056d37e016f Mon Sep 17 00:00:00 2001 From: cyBerta Date: Wed, 10 Aug 2022 12:48:48 +0200 Subject: reset provider details on next stable release --- .../se/leap/bitmaskclient/base/StartActivity.java | 19 +++++-------------- .../bitmaskclient/base/models/FeatureVersionCode.java | 4 ++-- 2 files changed, 7 insertions(+), 16 deletions(-) (limited to 'app') 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; } -- cgit v1.2.3