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 | |
parent | 0afde06c3702f36f42068b41424f308ca60f41ac (diff) |
Make break pad build option easier to use, add synchronized network listener
--HG--
extra : rebase_source : 3f8f7937917b03ca5c43ac6c78efad2f7b333289
-rw-r--r-- | jni/Android.mk | 3 | ||||
-rw-r--r-- | openvpn/Android.mk | 5 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnService.java | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/jni/Android.mk b/jni/Android.mk index 283be302..faeedd44 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -6,7 +6,10 @@ include lzo/Android.mk include openssl/Android.mk ifneq ($(TARGET_ARCH),mips) +WITH_BREAKPAD=1 include google-breakpad/android/google_breakpad/Android.mk +else +WITH_BREAKPAD=0 endif include openvpn/Android.mk diff --git a/openvpn/Android.mk b/openvpn/Android.mk index c68bcccf..23e24448 100644 --- a/openvpn/Android.mk +++ b/openvpn/Android.mk @@ -11,7 +11,7 @@ LOCAL_SHARED_LIBRARIES := libssl libcrypto LOCAL_CFLAGS= -DHAVE_CONFIG_H -DTARGET_ABI=\"${TARGET_ABI}\" LOCAL_STATIC_LIBRARIES := liblzo-static -ifneq ($(TARGET_ARCH),mips) +ifeq ($(WITH_BREAKPAD),1) LOCAL_STATIC_LIBRARIES += breakpad_client LOCAL_CFLAGS += -DGOOGLE_BREAKPAD=1 endif @@ -90,7 +90,8 @@ LOCAL_SRC_FILES:= \ src/openvpn/ssl_verify_polarssl.c \ src/openvpn/status.c \ src/openvpn/tun.c -ifneq ($(TARGET_ARCH),mips) + +ifeq ($(WITH_BREAKPAD),1) LOCAL_SRC_FILES+=src/openvpn/breakpad.cpp endif 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; |