diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-12-27 19:47:35 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-12-27 19:47:35 +0100 |
commit | 1c8e1f9adb41d69829886538e9b2b25a9aeb7bbb (patch) | |
tree | 90a37b04858799a40f16600f81edae0840f4a576 /src/de/blinkt/openvpn/ProfileManager.java | |
parent | 5420d42b057ad6e0d606088fa9e0836824db8b14 (diff) |
Make changes needed to provide an external API
Diffstat (limited to 'src/de/blinkt/openvpn/ProfileManager.java')
-rw-r--r-- | src/de/blinkt/openvpn/ProfileManager.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/ProfileManager.java b/src/de/blinkt/openvpn/ProfileManager.java index 9457b53f..9f17a68e 100644 --- a/src/de/blinkt/openvpn/ProfileManager.java +++ b/src/de/blinkt/openvpn/ProfileManager.java @@ -31,9 +31,13 @@ public class ProfileManager { private static VpnProfile mLastConnectedVpn=null; private HashMap<String,VpnProfile> profiles=new HashMap<String, VpnProfile>(); + private static VpnProfile tmpprofile=null; public static VpnProfile get(String key) { + if (tmpprofile!=null && tmpprofile.getUUIDString().equals(key)) + return tmpprofile; + if(instance==null) return null; return instance.profiles.get(key); @@ -122,6 +126,10 @@ public class ProfileManager { } + public static void setTemporaryProfile(VpnProfile tmp) { + ProfileManager.tmpprofile = tmp; + } + public void saveProfile(Context context,VpnProfile profile) { // First let basic settings save its state |