diff options
author | Samuel Holland <samuel@sholland.org> | 2018-01-07 00:41:47 -0600 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2018-01-07 00:41:47 -0600 |
commit | e70b242c016709c41a09114996806fbdef30dd80 (patch) | |
tree | 008b081cce1873dec39c1472fb15aaed0bf3d4d7 /app/src/main/java/com/wireguard/android/model/Tunnel.java | |
parent | 77fdd7c883086e698c83b2a2f5e58ff62359c5ea (diff) |
model: Remove confusing uses of completion chaining
This looks like the builder pattern, but isn't.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src/main/java/com/wireguard/android/model/Tunnel.java')
-rw-r--r-- | app/src/main/java/com/wireguard/android/model/Tunnel.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/src/main/java/com/wireguard/android/model/Tunnel.java b/app/src/main/java/com/wireguard/android/model/Tunnel.java index 9bb7406c..e61ea095 100644 --- a/app/src/main/java/com/wireguard/android/model/Tunnel.java +++ b/app/src/main/java/com/wireguard/android/model/Tunnel.java @@ -95,24 +95,21 @@ public class Tunnel extends BaseObservable implements Keyed<String> { return CompletableFuture.completedFuture(statistics); } - Config onConfigChanged(final Config config) { + void onConfigChanged(final Config config) { this.config = config; notifyPropertyChanged(BR.config); - return config; } - State onStateChanged(final State state) { + void onStateChanged(final State state) { if (state != State.UP) onStatisticsChanged(null); this.state = state; notifyPropertyChanged(BR.state); - return state; } - Statistics onStatisticsChanged(final Statistics statistics) { + void onStatisticsChanged(final Statistics statistics) { this.statistics = statistics; notifyPropertyChanged(BR.statistics); - return statistics; } public CompletionStage<Config> setConfig(@NonNull final Config config) { |