From 59ad36bde94ae385191a39e28065a2e0a1024713 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 17 Aug 2012 09:38:59 +0200 Subject: bugfix for notifications --- src/de/blinkt/openvpn/OpenVpnService.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/de/blinkt/openvpn') diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java index f7ed10a8..73a034ee 100644 --- a/src/de/blinkt/openvpn/OpenVpnService.java +++ b/src/de/blinkt/openvpn/OpenVpnService.java @@ -36,7 +36,7 @@ import android.preference.PreferenceManager; import de.blinkt.openvpn.OpenVPN.StateListener; public class OpenVpnService extends VpnService implements StateListener { - private Thread mProcessThread; + private Thread mProcessThread=null; private Vector mDnslist=new Vector(); @@ -104,6 +104,7 @@ public class OpenVpnService extends VpnService implements StateListener { mNotificationManager.notify(OPENVPN_STATUS, notification); + startForeground(OPENVPN_STATUS, notification); return notification; } @@ -168,8 +169,8 @@ public class OpenVpnService extends VpnService implements StateListener { String profileUUID = intent.getStringExtra(prefix + ".profileUUID"); mProfile = ProfileManager.get(profileUUID); - Notification start = showNotification("Starting VPN " + mProfile.mName,null); - startForeground(OPENVPN_STATUS, start); + showNotification("Starting VPN " + mProfile.mName,null); + OpenVPN.addSpeedListener(this); -- cgit v1.2.3