diff options
author | akuma <akuma> | 2019-09-08 20:40:29 +0200 |
---|---|---|
committer | akuma <akuma> | 2019-09-08 20:40:29 +0200 |
commit | 2e1c94d3f51dc6d667435b2a2bbd81a036d57bae (patch) | |
tree | 43590440908ce85ef286487bb5c44155b3de1f8e /app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java | |
parent | f510feb3130f7f28a5b9116c903a33e92d37ba5c (diff) |
New icon and text for Excluded Apps. Using PreferenceHelper. Test done.
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java index 77666378..09b33845 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java @@ -32,6 +32,7 @@ import java.util.Set; import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.core.ConfigParser; import se.leap.bitmaskclient.BitmaskApp; +import se.leap.bitmaskclient.utils.PreferenceHelper; /** * Gateway provides objects defining gateways and their metadata. @@ -71,8 +72,14 @@ public class Gateway { System.out.println("###########" + mName + "###########"); mVpnProfile.mName = mName; - SharedPreferences allow_apps = context.getSharedPreferences("BITMASK", Context.MODE_MULTI_PROCESS); - mVpnProfile.mAllowedAppsVpn = new HashSet<String>(allow_apps.getStringSet("ALLOW_APPS", new HashSet<String>())); + Set<String> excludedAppsVpn = PreferenceHelper.getExcludedApps(context); + if (excludedAppsVpn != null) { + mVpnProfile.mAllowedAppsVpn = new HashSet<>(excludedAppsVpn); + } + else { + mVpnProfile.mAllowedAppsVpn = null; + } + } private JSONObject getGeneralConfiguration(JSONObject eip_definition) { |