From 22aaacb73893b4e350dbcd7ce325236a8f8cee27 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Thu, 21 Apr 2016 14:40:53 +0200 Subject: Really use the Always on Profile --- main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'main/src') diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 3ab39a84..abb8c270 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -371,8 +371,10 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac Log.d("OpenVPN", "Got no last connected profile on null intent. Assuming always on."); mProfile = ProfileManager.getAlwaysOnVPN(this); - stopSelf(startId); - return START_NOT_STICKY; + if (mProfile==null) { + stopSelf(startId); + return START_NOT_STICKY; + } } /* Do the asynchronous keychain certificate stuff */ mProfile.checkForRestart(this); -- cgit v1.2.3