summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-02-25 14:15:33 +0100
committerArne Schwabe <arne@rfc2549.org>2013-02-25 14:15:33 +0100
commitbab6645cfb1eb9321e67482d862314a1dbf14f95 (patch)
tree1e0adc18cb0ba65f7b8f2cc8b3f32b5a0ca451ec /src
parentc078407422b7e10f5306b1763ba7986960e92d3a (diff)
Fix notificationalwaysvisible bug
Diffstat (limited to 'src')
-rw-r--r--src/de/blinkt/openvpn/OpenVPN.java2
-rw-r--r--src/de/blinkt/openvpn/OpenVpnService.java7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java
index fb759104..0dc5a871 100644
--- a/src/de/blinkt/openvpn/OpenVPN.java
+++ b/src/de/blinkt/openvpn/OpenVPN.java
@@ -297,7 +297,7 @@ public class OpenVPN {
private static int getLevel(String state){
String[] noreplyet = {"CONNECTING","WAIT", "RECONNECTING", "RESOLVE", "TCP_CONNECT"};
- String[] reply = {"AUTH","GETCONFIG","ASSIGN_IP","ADD_ROUTES"};
+ String[] reply = {"AUTH","GET_CONFIG","ASSIGN_IP","ADD_ROUTES"};
String[] connected = {"CONNECTED"};
String[] notconnected = {"DISCONNECTED", "EXITING"};
diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java
index 66ab9e30..cecae9d1 100644
--- a/src/de/blinkt/openvpn/OpenVpnService.java
+++ b/src/de/blinkt/openvpn/OpenVpnService.java
@@ -114,15 +114,16 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
private void endVpnService() {
mProcessThread=null;
OpenVPN.logBuilderConfig(null);
- OpenVPN.removeStateListener(this);
OpenVPN.removeByteCountListener(this);
unregisterNetworkStateReceiver();
ProfileManager.setConntectedVpnProfileDisconnected(this);
if(!mStarting) {
stopForeground(!mNotificationalwaysVisible);
- if( !mNotificationalwaysVisible)
+ if( !mNotificationalwaysVisible) {
stopSelf();
+ OpenVPN.removeStateListener(this);
+ }
}
}
@@ -351,6 +352,8 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
if (mNetworkStateReceiver!= null) {
this.unregisterReceiver(mNetworkStateReceiver);
}
+ // Just in case unregister for state
+ OpenVPN.removeStateListener(this);
}