diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java b/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java index c924caee..54868549 100644 --- a/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java +++ b/app/src/main/java/se/leap/bitmaskclient/tor/TorStatusObservable.java @@ -287,4 +287,9 @@ public class TorStatusObservable extends Observable { public static boolean isCancelled() { return getInstance().cancelled; } + + public static boolean isRunning() { + return !TorStatusObservable.isCancelled() && + TorStatusObservable.getStatus() != TorStatusObservable.TorStatus.OFF; + } } |