From 10ed266d2ccc22c9b7216b92f70875822ec2acce Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Sat, 23 Aug 2014 00:25:40 +0000
Subject: [PATCH] Clarify property inversion

---
 app/src/main/java/net/i2p/android/router/util/Util.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/app/src/main/java/net/i2p/android/router/util/Util.java b/app/src/main/java/net/i2p/android/router/util/Util.java
index 563283df5..d9aeb71c3 100644
--- a/app/src/main/java/net/i2p/android/router/util/Util.java
+++ b/app/src/main/java/net/i2p/android/router/util/Util.java
@@ -154,11 +154,8 @@ public abstract class Util {
                     x.equals("i2cp.disableInterface")) {
                 // special exception, we must invert the bool for these properties only.
                 String string = all.get(x).toString();
-                String what="true";
-                if(string.equals(what)) {
-                    what="false";
-                }
-                routerProps.setProperty(x, what);
+                String inverted = Boolean.toString(!Boolean.parseBoolean(string));
+                routerProps.setProperty(x, inverted);
             } else {
                 String string = all.get(x).toString();
                 routerProps.setProperty(x, string);
-- 
GitLab