summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java3
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java b/app/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java
index 2b0c785e..219c1394 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java
@@ -13,6 +13,7 @@ import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.State;
import android.os.Handler;
+import android.os.Looper;
import android.preference.PreferenceManager;
import se.leap.bitmaskclient.R;
@@ -133,7 +134,7 @@ public class DeviceStateReceiver extends BroadcastReceiver implements ByteCountL
trafficdata = new LinkedList<>();
mManagement = management;
mManagement.setPauseCallback(this);
- mDisconnectHandler = new Handler();
+ mDisconnectHandler = new Handler(Looper.getMainLooper());
}
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
index 00147828..0edfeaeb 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
@@ -457,7 +457,7 @@ public class OpenVpnManagementThread implements Runnable, OpenVPNManagement {
}
// atuo detection of proxy
- if (proxyType == Connection.ProxyType.NONE) {
+ if (proxyType == Connection.ProxyType.NONE && mProfile != null) {
SocketAddress proxyaddr = ProxyDetection.detectProxy(mProfile);
if (proxyaddr instanceof InetSocketAddress) {
InetSocketAddress isa = (InetSocketAddress) proxyaddr;