diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/wireguard/android/backends/VpnService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/com/wireguard/android/backends/VpnService.java b/app/src/main/java/com/wireguard/android/backends/VpnService.java index 25eb4ade..275b719c 100644 --- a/app/src/main/java/com/wireguard/android/backends/VpnService.java +++ b/app/src/main/java/com/wireguard/android/backends/VpnService.java @@ -241,9 +241,9 @@ public class VpnService extends Service @Override protected void onPostExecute(final Boolean result) { + config.setIsEnabled(!result); if (!result) return; - config.setIsEnabled(false); enabledConfigs.remove(config.getName()); preferences.edit().putStringSet(KEY_ENABLED_CONFIGS, enabledConfigs).apply(); if (config.getName().equals(primaryName)) @@ -267,9 +267,9 @@ public class VpnService extends Service @Override protected void onPostExecute(final Boolean result) { + config.setIsEnabled(result); if (!result) return; - config.setIsEnabled(true); enabledConfigs.add(config.getName()); preferences.edit().putStringSet(KEY_ENABLED_CONFIGS, enabledConfigs).apply(); if (config.getName().equals(primaryName)) |