mirror of
https://github.com/amnezia-vpn/amneziawg-android.git
synced 2026-07-03 14:05:13 +02:00
Tunnel: Add a State factory method
Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
@@ -129,7 +129,11 @@ public class Tunnel extends BaseObservable implements Keyed<String> {
|
||||
public enum State {
|
||||
DOWN,
|
||||
TOGGLE,
|
||||
UP
|
||||
UP;
|
||||
|
||||
public static State of(final boolean running) {
|
||||
return running ? UP : DOWN;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Statistics extends BaseObservable {
|
||||
|
||||
Reference in New Issue
Block a user