diff options
author | cyBerta <cyberta@riseup.net> | 2021-02-26 19:43:08 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2021-02-26 19:43:08 +0100 |
commit | 2666b87be9d8911ca21a555f6d33e8202063e87b (patch) | |
tree | d892fab13609b081fb2e4923005116f6b66dd042 /app/src/main/java | |
parent | bc0d94ad4f4102b63813655ef86e0d3d08b6b1c5 (diff) |
make sure a notification is shown on reboot with always-on enabled
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index a40c2e75..a734dd90 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -330,6 +330,8 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac } else { /* The intent is null when we are set as always-on or the service has been restarted. */ Log.d(TAG, "Starting VPN due to isAlwaysOn system settings or app crash."); + startWithForegroundNotification(); + mProfile = VpnStatus.getLastConnectedVpnProfile(this); VpnStatus.logInfo(R.string.service_restarted); @@ -371,9 +373,6 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac } private void startOpenVPN() { - /** - * see change above (l. 292 ff) - */ //TODO: investigate how connections[n] with n>0 get called during vpn setup (on connection refused?) // Do we need to check if there's any obfs4 connection in mProfile.mConnections and start // the dispatcher here? Can we start the dispatcher at a later point of execution, e.g. when |