diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-03-04 23:20:41 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-03-04 23:20:41 +0100 |
commit | 6b9066c712690471727a86bbd56c969c57bf3b0a (patch) | |
tree | b024e1d392d2f653694f3c7eb7679ad751361036 /src/de/blinkt/openvpn | |
parent | 0afde06c3702f36f42068b41424f308ca60f41ac (diff) |
Make break pad build option easier to use, add synchronized network listener
--HG--
extra : rebase_source : 3f8f7937917b03ca5c43ac6c78efad2f7b333289
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java index c73a1556..241bf774 100644 --- a/src/de/blinkt/openvpn/OpenVpnService.java +++ b/src/de/blinkt/openvpn/OpenVpnService.java @@ -233,14 +233,14 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac } - void registerNetworkStateReceiver(OpenVPNMangement magnagement) { + synchronized void registerNetworkStateReceiver(OpenVPNMangement magnagement) { // Registers BroadcastReceiver to track network connection changes. IntentFilter filter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); mNetworkStateReceiver = new NetworkSateReceiver(magnagement); this.registerReceiver(mNetworkStateReceiver, filter); } - void unregisterNetworkStateReceiver() { + synchronized void unregisterNetworkStateReceiver() { if(mNetworkStateReceiver!=null) this.unregisterReceiver(mNetworkStateReceiver); mNetworkStateReceiver=null; |