From 678024d9be61e6b0bb55b826c4c488521e16de8d Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 27 Dec 2018 19:10:46 +0100 Subject: add test and minor refactoring for gateway selection --- app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/src/main/java/se/leap/bitmaskclient/utils') diff --git a/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java b/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java index 326139c0..d1ac0eb3 100644 --- a/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java @@ -39,6 +39,7 @@ import java.security.cert.X509Certificate; import java.security.interfaces.RSAPrivateKey; import java.security.spec.InvalidKeySpecException; import java.security.spec.PKCS8EncodedKeySpec; +import java.util.Calendar; import se.leap.bitmaskclient.BuildConfig; import se.leap.bitmaskclient.ProviderAPI; @@ -177,4 +178,8 @@ public class ConfigHelper { public static boolean preferAnonymousUsage() { return BuildConfig.priotize_anonymous_usage; } + + public static int getCurrentTimezone() { + return Calendar.getInstance().get(Calendar.ZONE_OFFSET) / 3600000; + } } -- cgit v1.2.3