summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/firewall/StartFirewallTask.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/firewall/StartFirewallTask.java b/app/src/main/java/se/leap/bitmaskclient/firewall/StartFirewallTask.java
index 9b3a125f..3bf6d684 100644
--- a/app/src/main/java/se/leap/bitmaskclient/firewall/StartFirewallTask.java
+++ b/app/src/main/java/se/leap/bitmaskclient/firewall/StartFirewallTask.java
@@ -28,11 +28,9 @@ class StartFirewallTask extends AsyncTask<Void, Boolean, Boolean> {
try {
boolean hasBitmaskChain = runBlockingCmd(bitmaskChain, log) == 0;
boolean allowSu = log.toString().contains("uid=0");
- try {
- callbackWeakReference.get().onSuRequested(allowSu);
- Thread.sleep(1000);
- } catch (Exception e) {
- //ignore
+ callbackWeakReference.get().onSuRequested(allowSu);
+ if (!allowSu) {
+ return false;
}
boolean success;