diff options
author | cyBerta <cyberta@riseup.net> | 2019-07-06 17:37:48 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2019-07-12 17:03:55 +0200 |
commit | 65a09aa799e525d3bc60f5f4f489a3d70c6a8554 (patch) | |
tree | 21664e9cc83c368395bacdc8abe3292c9a7db89d /app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | |
parent | f5b8dae753448ed698486af8b49b977a58d4fcdc (diff) |
get rid of ics-openvpn's ProfileManager, reduces boilerplate and dead code
Diffstat (limited to 'app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 6 |
1 files changed, 2 insertions, 4 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 ea782e00..4e92f67b 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -322,7 +322,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac PreferenceHelper.setAlwaysOn(this, false); } else { /* The intent is null when we are set as always-on or the service has been restarted. */ - mProfile = ProfileManager.getLastConnectedProfile(this); + mProfile = VpnStatus.getLastConnectedVpnProfile(this); VpnStatus.logInfo(R.string.service_restarted); if (mProfile != null) { @@ -344,9 +344,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac /* start the OpenVPN process itself in a background thread */ new Thread(this::startOpenVPN).start(); - - ProfileManager.setConnectedVpnProfile(this, mProfile); - VpnStatus.setConnectedVPNProfile(mProfile.getUUIDString()); + VpnStatus.setLastConnectedVpnProfile(getApplicationContext(), mProfile); return START_STICKY; } |