From 649635bc8f8178aba36f07b59ada813f55dc34a0 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 7 Mar 2020 01:04:19 +0100 Subject: fix bluetooth tethering --- .../main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/src/main/java/se/leap/bitmaskclient/firewall') diff --git a/app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java b/app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java index 6ce8ee61..edf79add 100644 --- a/app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java +++ b/app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java @@ -147,18 +147,19 @@ public class SetupTetheringTask extends AsyncTask { return runBlockingCmd(addRules, log) == 0; } - private boolean removeBluetoothTetheringRules(TetheringState state, StringBuilder log) throws Exception { + private boolean addBluetoothTetheringRules(TetheringState state, StringBuilder log) throws Exception { Log.d(TAG, "add bluetooth tethering rules"); String[] addRules = getAdditionRules(state.bluetoothAddress, state.bluetoothInterface); return runBlockingCmd(addRules, log) == 0; } - private boolean addBluetoothTetheringRules(TetheringState state, StringBuilder log) throws Exception { + private boolean removeBluetoothTetheringRules(TetheringState state, StringBuilder log) throws Exception { Log.d(TAG, "remove bluetooth tethering rules"); String[] addRules = getDeletionRules(state, state.lastSeenBluetoothAddress, state.lastSeenBluetoothInterface); return runBlockingCmd(addRules, log) == 0; } + private String[] getAdditionRules(String addressRange, String interfaceName) { return new String[] { "su", -- cgit v1.2.3