summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/fragments
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-03-02 04:17:23 +0100
committercyBerta <cyberta@riseup.net>2020-03-02 04:17:23 +0100
commit2fcae35a5592aae3ac932e595717ea8d185ab606 (patch)
treebfb2485f9caa4c9af888d9b7eee1d7c6356c6f1f /app/src/main/java/se/leap/bitmaskclient/fragments
parentf1c88d01dbbcc2ccd1fd7f82c822e5f280ed75f7 (diff)
finish bluetooth tethering implementation
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/fragments')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java b/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java
index 1bc90605..900d1885 100644
--- a/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java
@@ -152,10 +152,10 @@ public class TetheringDialog extends AppCompatDialogFragment implements Observer
.setPositiveButton(android.R.string.ok, (dialog, id) -> {
PreferenceHelper.allowWifiTethering(getContext(), dataset[0].checked);
PreferenceHelper.allowUsbTethering(getContext(), dataset[1].checked);
-// PreferenceHelper.allowBluetoothTethering(getContext(), dataset[2].checked);
+ PreferenceHelper.allowBluetoothTethering(getContext(), dataset[2].checked);
TetheringObservable.allowVpnWifiTethering(dataset[0].checked);
TetheringObservable.allowVpnUsbTethering(dataset[1].checked);
-// TetheringObservable.allowVpnBluetoothTethering(dataset[2].checked);
+ TetheringObservable.allowVpnBluetoothTethering(dataset[2].checked);
FirewallManager firewallManager = new FirewallManager(getContext().getApplicationContext(), false);
if (VpnStatus.isVPNActive()) {
if (TetheringObservable.getInstance().getTetheringState().hasAnyDeviceTetheringEnabled() &&
@@ -174,7 +174,7 @@ public class TetheringDialog extends AppCompatDialogFragment implements Observer
super.onResume();
dataset[0].enabled = TetheringObservable.getInstance().isWifiTetheringEnabled();
dataset[1].enabled = TetheringObservable.getInstance().isUsbTetheringEnabled();
-// dataset[2].enabled = TetheringObservable.getInstance().isBluetoothTetheringEnabled();
+ dataset[2].enabled = TetheringObservable.getInstance().isBluetoothTetheringEnabled();
adapter.notifyDataSetChanged();
TetheringObservable.getInstance().addObserver(this);
}
@@ -229,10 +229,10 @@ public class TetheringDialog extends AppCompatDialogFragment implements Observer
getContext().getString(R.string.tethering_usb),
PreferenceHelper.isUsbTetheringAllowed(getContext()),
TetheringObservable.getInstance().isUsbTetheringEnabled()),
-/* new DialogListAdapter.ViewModel(getContext().getResources().getDrawable(R.drawable.ic_bluetooth),
+ new DialogListAdapter.ViewModel(getContext().getResources().getDrawable(R.drawable.ic_bluetooth),
getContext().getString(R.string.tethering_bluetooth),
PreferenceHelper.isBluetoothTetheringAllowed(getContext()),
- TetheringObservable.getInstance().isUsbTetheringEnabled())*/
+ TetheringObservable.getInstance().isUsbTetheringEnabled())
};
}
@@ -243,7 +243,7 @@ public class TetheringDialog extends AppCompatDialogFragment implements Observer
Log.d(TAG, "TetheringObservable is updated");
dataset[0].enabled = observable.isWifiTetheringEnabled();
dataset[1].enabled = observable.isUsbTetheringEnabled();
-// dataset[2].enabled = observable.isBluetoothTetheringEnabled();
+ dataset[2].enabled = observable.isBluetoothTetheringEnabled();
adapter.notifyDataSetChanged();
}
}