diff options
| author | 2017-08-23 23:43:58 -0500 | |
|---|---|---|
| committer | 2017-08-23 23:43:58 -0500 | |
| commit | 95384851cd829b33dee99b3e7d5c5423cb69716f (patch) | |
| tree | a1310bdea0873029b51c6624420ad44bc5ab0886 /app/src/main/java/com/wireguard/config/Interface.java | |
| parent | VpnService: Fix some edge cases in ConfigUpdater (diff) | |
| download | wireguard-android-95384851cd829b33dee99b3e7d5c5423cb69716f.tar.xz wireguard-android-95384851cd829b33dee99b3e7d5c5423cb69716f.zip | |
Config/Interface/Peer: Fix some missed change notifications
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com/wireguard/config/Interface.java')
| -rw-r--r-- | app/src/main/java/com/wireguard/config/Interface.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/src/main/java/com/wireguard/config/Interface.java b/app/src/main/java/com/wireguard/config/Interface.java index b81b6d99..a4ea4b81 100644 --- a/app/src/main/java/com/wireguard/config/Interface.java +++ b/app/src/main/java/com/wireguard/config/Interface.java @@ -42,6 +42,7 @@ public class Interface extends BaseObservable implements Copyable<Interface>, Ob mtu = null; setPrivateKey(null); } + notifyChange(); } public void generateKeypair() { @@ -81,16 +82,16 @@ public class Interface extends BaseObservable implements Copyable<Interface>, Ob return keypair != null ? keypair.getPublicKey() : null; } - public void parseFrom(final String line) { + public void parse(final String line) { final Attribute key = Attribute.match(line); if (key == Attribute.ADDRESS) - address = key.parseFrom(line); + setAddress(key.parseFrom(line)); else if (key == Attribute.DNS) - dns = key.parseFrom(line); + setDns(key.parseFrom(line)); else if (key == Attribute.LISTEN_PORT) - listenPort = key.parseFrom(line); + setListenPort(key.parseFrom(line)); else if (key == Attribute.MTU) - mtu = key.parseFrom(line); + setMtu(key.parseFrom(line)); else if (key == Attribute.PRIVATE_KEY) setPrivateKey(key.parseFrom(line)); else |
