diff options
author | Parménides GV <parmegv@sdf.org> | 2015-04-20 18:20:05 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2015-04-22 12:36:39 +0200 |
commit | d486768d6b0664d9032605897c8f1847ef4e3a39 (patch) | |
tree | ff82a890fa6477d3c70d70ef33b8044c88fa53ff /app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java | |
parent | 8862197a0a138f942e9c76a29aaf189f4c5141b4 (diff) |
Remove textual status.
I had a difficult moment trying to detect if the LogWindow had already
been shown after an error. Finally, I implemented a LogWindowWrapper
which contains a field for the reason it was shown, so that we can check
if the previous error is the same than the current one leading to the
avoidance of the second LogWindow. For this to work, we need to reset
that reason each time we trigger a new vpn state (i.e. each time the
user taps on the vpn icon).
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java b/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java index dac92fe2..cbf0fed2 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java @@ -50,6 +50,10 @@ public class VoidVpnService extends VpnService { closeFd(); } + public static boolean isRunning() throws NullPointerException { + return thread.isAlive() && fd != null; + } + private static void closeFd() { try { if (fd != null) |