summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2020-01-25 11:21:47 -0600
committercyberta <cyberta@riseup.net>2020-01-25 11:21:47 -0600
commitc5bb5c18a8884410580b589aa6e8f6aaca046764 (patch)
treec8ddc12a29b9d0955b85c87ef18b6a08263ffd11 /app/src/main/java/se/leap
parentcade04a80ac91d7a4d9ea839fec75aff3f932651 (diff)
stop setting up firewall if su was not permitted
Diffstat (limited to 'app/src/main/java/se/leap')
-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;