summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-01-16 05:52:17 -0600
committerSamuel Holland <samuel@sholland.org>2018-01-17 14:35:39 -0600
commit54f201174d3fa66053871532e0ba4b0bf3729337 (patch)
tree7ca40415471244f8735aefd222e83923a4a4c01a
parentfb3138bdda7ed8b885441f71e86ed37eb4cdd746 (diff)
TunnelManager: Use constants directly where appropriate
Signed-off-by: Samuel Holland <samuel@sholland.org>
-rw-r--r--app/src/main/java/com/wireguard/android/model/TunnelManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/com/wireguard/android/model/TunnelManager.java b/app/src/main/java/com/wireguard/android/model/TunnelManager.java
index 9e03cc39..381e7f77 100644
--- a/app/src/main/java/com/wireguard/android/model/TunnelManager.java
+++ b/app/src/main/java/com/wireguard/android/model/TunnelManager.java
@@ -90,7 +90,7 @@ public final class TunnelManager extends BaseObservable {
configStore.delete(tunnel.getName());
} catch (final Exception e) {
if (originalState == State.UP)
- backend.setState(tunnel, originalState);
+ backend.setState(tunnel, State.UP);
// Re-throw the exception to fail the completion.
throw e;
}
@@ -199,7 +199,7 @@ public final class TunnelManager extends BaseObservable {
configStore.rename(tunnel.getName(), name);
final String newName = tunnel.onNameChanged(name);
if (originalState == State.UP)
- backend.setState(tunnel, originalState);
+ backend.setState(tunnel, State.UP);
return newName;
}).whenComplete((newName, e) -> {
// On failure, we don't know what state the tunnel might be in. Fix that.