From c5bb5c18a8884410580b589aa6e8f6aaca046764 Mon Sep 17 00:00:00 2001 From: cyberta Date: Sat, 25 Jan 2020 11:21:47 -0600 Subject: stop setting up firewall if su was not permitted --- .../java/se/leap/bitmaskclient/firewall/StartFirewallTask.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'app/src/main/java/se/leap') 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 { 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; -- cgit v1.2.3