diff options
author | cyBerta <cyberta@riseup.net> | 2023-08-03 17:17:38 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-08-03 17:17:38 +0200 |
commit | 95588ead61742b49250fabbf2fa4d05df9068f81 (patch) | |
tree | 9434bf85bc241c8841191a42927a6f9950370d43 /app/src | |
parent | 99bdde5e10222a65d43f5c9d1e3fe2cde502fd1e (diff) |
preselect plain vpn/cirucmvention selection from shared preferences
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java | 6 | ||||
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java b/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java index 1168f957..b35a04cd 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java @@ -404,12 +404,6 @@ public class PreferenceHelper { } } - /** - * hasSnowflakePrefs should return always true with the new provider setup flow. We keep this preference - * only as long as we haven't ported the provider setup flow to the custom branded version - * @return - */ - @Deprecated public static boolean hasSnowflakePrefs() { return hasKey(USE_SNOWFLAKE); } diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java index 2709fd0b..4a08bc4e 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/CircumventionSetupFragment.java @@ -43,7 +43,11 @@ public class CircumventionSetupFragment extends BaseSetupFragment { binding.rbPlainVpn.setTypeface(Typeface.DEFAULT, Typeface.BOLD); binding.rbCircumvention.setTypeface(Typeface.DEFAULT, Typeface.NORMAL); }); - binding.circumventionRadioGroup.check(binding.rbPlainVpn.getId()); + + int id = (PreferenceHelper.hasSnowflakePrefs() && PreferenceHelper.getUseSnowflake()) ? + binding.rbCircumvention.getId() : + binding.rbPlainVpn.getId(); + binding.circumventionRadioGroup.check(id); return binding.getRoot(); } |