summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/core
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-08-07 00:05:02 +0200
committerArne Schwabe <arne@rfc2549.org>2013-08-07 00:05:02 +0200
commitbe8b263f543530eb2142f362d0d7346f013c57c3 (patch)
tree339b27c8cbfc6a1e0a79039afafa374805ae083c /src/de/blinkt/openvpn/core
parent5e857c81eb31b4f1f445cffc28b575359993e38d (diff)
Always pass context when retrieving vpn config, don't try JB+ extra on ICS (closes issue #188)
Diffstat (limited to 'src/de/blinkt/openvpn/core')
-rw-r--r--src/de/blinkt/openvpn/core/OpenVpnService.java6
-rw-r--r--src/de/blinkt/openvpn/core/ProfileManager.java2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/core/OpenVpnService.java b/src/de/blinkt/openvpn/core/OpenVpnService.java
index 6aacf891..438f4286 100644
--- a/src/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/src/de/blinkt/openvpn/core/OpenVpnService.java
@@ -140,7 +140,9 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
// Try to set the priority available since API 16 (Jellybean)
- jbNotificationExtras(lowpriority, nbuilder);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
+ jbNotificationExtras(lowpriority, nbuilder);
+
if(tickerText!=null && !tickerText.equals(""))
nbuilder.setTicker(tickerText);
@@ -298,7 +300,7 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
String nativelibdir = intent.getStringExtra(prefix + ".nativelib");
String profileUUID = intent.getStringExtra(prefix + ".profileUUID");
- mProfile = ProfileManager.get(profileUUID);
+ mProfile = ProfileManager.get(this,profileUUID);
String startTitle = getString(R.string.start_vpn_title, mProfile.mName);
String startTicker = getString(R.string.start_vpn_ticker, mProfile.mName);
diff --git a/src/de/blinkt/openvpn/core/ProfileManager.java b/src/de/blinkt/openvpn/core/ProfileManager.java
index d1c4afc1..27b64b90 100644
--- a/src/de/blinkt/openvpn/core/ProfileManager.java
+++ b/src/de/blinkt/openvpn/core/ProfileManager.java
@@ -36,7 +36,7 @@ public class ProfileManager {
private static VpnProfile tmpprofile=null;
- public static VpnProfile get(String key) {
+ private static VpnProfile get(String key) {
if (tmpprofile!=null && tmpprofile.getUUIDString().equals(key))
return tmpprofile;