summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2020-01-31 11:20:42 -0600
committercyberta <cyberta@riseup.net>2020-01-31 11:21:02 -0600
commite8b11d68870ed59663541c039418cdca30c6408c (patch)
treeda2c96202dc913c5d7dd7a023b64e221f6ab46f7 /app/src/main/java
parentc0fc9a2daa2ca65fe14cf79445b70cc369aca918 (diff)
hide bluetooth tethering for now
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java35
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/tethering/TetheringStateManager.java2
2 files changed, 25 insertions, 12 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 52ed16f7..c53d2a6c 100644
--- a/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java
@@ -20,6 +20,23 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+/**
+ * Copyright (c) 2020 LEAP Encryption Access Project and contributers
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
import java.util.Observable;
import java.util.Observer;
@@ -32,10 +49,6 @@ import se.leap.bitmaskclient.tethering.TetheringObservable;
import se.leap.bitmaskclient.utils.PreferenceHelper;
import se.leap.bitmaskclient.views.IconCheckboxEntry;
-/**
- * Created by cyberta on 25.02.18.
- */
-
public class TetheringDialog extends AppCompatDialogFragment implements Observer {
public final static String TAG = TetheringDialog.class.getName();
@@ -60,7 +73,7 @@ public class TetheringDialog extends AppCompatDialogFragment implements Observer
private ViewModel[] dataSet;
private OnItemClickListener clickListener;
- public DialogListAdapter(ViewModel[] dataSet, OnItemClickListener clickListener) {
+ DialogListAdapter(ViewModel[] dataSet, OnItemClickListener clickListener) {
this.dataSet = dataSet;
this.clickListener = clickListener;
}
@@ -137,10 +150,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() &&
@@ -159,7 +172,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);
}
@@ -204,10 +217,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())*/
};
}
@@ -218,7 +231,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();
}
}
diff --git a/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringStateManager.java b/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringStateManager.java
index 4a266d87..4c6abd5b 100644
--- a/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringStateManager.java
+++ b/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringStateManager.java
@@ -85,7 +85,7 @@ public class TetheringStateManager {
}
static void updateBluetoothTetheringState() {
- TetheringObservable.setBluetoothTethering(isBluetoothTetheringEnabled());
+ //TetheringObservable.setBluetoothTethering(isBluetoothTetheringEnabled());
}
private static String getWifiAddressRange() {