diff options
author | cyBerta <cyberta@riseup.net> | 2022-08-08 19:04:28 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2022-08-08 19:04:28 +0200 |
commit | 090b2f7412889aa18dc0c7cfe28c829b9e36384e (patch) | |
tree | 75dd1f7640a9c69ffdffedf2dd9786d1a01f686d /app/src/main | |
parent | 363ce8d3c1fd9e25b5fa2423691d13f845f4f89f (diff) |
apply some minor bugfixes from ics-openvpn
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java | 3 | ||||
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java | 2 |
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; |