diff options
author | Arne Schwabe <arne@rfc2549.org> | 2016-04-21 14:40:53 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2016-04-21 14:40:53 +0200 |
commit | 22aaacb73893b4e350dbcd7ce325236a8f8cee27 (patch) | |
tree | 343c88262d534e7fb7a8e2c0d3dc44f7320adcae | |
parent | b4b187c5be3bc4d588e397573b09527ae6630ab9 (diff) |
Really use the Always on Profile
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 6 |
1 files changed, 4 insertions, 2 deletions
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); |