From 5c4960cdb37b42ac82d22288e6de946e230b4a7b Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 16 Mar 2021 22:29:57 +0100 Subject: rename preference helper method for getting the preferred city --- .../main/java/se/leap/bitmaskclient/base/utils/PreferenceHelper.java | 2 +- app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java | 4 ++-- 2 files changed, 3 insertions(+), 3 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 19b30b4d..a3d1314e 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 @@ -204,7 +204,7 @@ public class PreferenceHelper { return getBoolean(context, ALWAYS_ON_SHOW_DIALOG, true); } - public static String getSelectedCity(Context context) { + public static String getPreferredCity(Context context) { return getString(context, PREFERRED_CITY, null); } diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java index 9a8ff0bd..b06e894e 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java @@ -47,7 +47,7 @@ import static se.leap.bitmaskclient.base.models.Constants.HOST; import static se.leap.bitmaskclient.base.models.Constants.PROVIDER_PRIVATE_KEY; import static se.leap.bitmaskclient.base.models.Constants.PROVIDER_VPN_CERTIFICATE; import static se.leap.bitmaskclient.base.models.Constants.SORTED_GATEWAYS; -import static se.leap.bitmaskclient.base.utils.PreferenceHelper.getSelectedCity; +import static se.leap.bitmaskclient.base.utils.PreferenceHelper.getPreferredCity; import static se.leap.bitmaskclient.base.utils.PreferenceHelper.getUsePluggableTransports; /** @@ -73,7 +73,7 @@ public class GatewaysManager { */ public Gateway select(int nClosest) { Connection.TransportType transportType = getUsePluggableTransports(context) ? OBFS4 : OPENVPN; - String selectedCity = getSelectedCity(context); + String selectedCity = getPreferredCity(context); if (presortedList.size() > 0) { return getGatewayFromPresortedList(nClosest, transportType, selectedCity); } -- cgit v1.2.3