summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-08-17 09:38:59 +0200
committerArne Schwabe <arne@rfc2549.org>2012-08-17 09:38:59 +0200
commitc4984d2742c8daf7c178d6ecee88eb0d46b986c2 (patch)
treecf63255092048d1537a6dbc3d0fe61b4319218ce /src/de/blinkt/openvpn
parenta9aaf6c38d80dda30331275359a554539e3b134b (diff)
bugfix for notifications
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r--src/de/blinkt/openvpn/OpenVpnService.java7
1 files changed, 4 insertions, 3 deletions
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<String> mDnslist=new Vector<String>();
@@ -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);