diff options
Diffstat (limited to 'src/de/blinkt/openvpn/core')
-rw-r--r-- | src/de/blinkt/openvpn/core/OpenVpnService.java | 6 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/core/ProfileManager.java | 2 |
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; |