Simplified getting the BluetoothAdapter.

This commit is contained in:
Dennis Guse
2020-08-04 16:54:30 +02:00
parent 9e553cc900
commit cf45a8079c
5 changed files with 18 additions and 49 deletions
@@ -137,7 +137,7 @@ public class SettingsActivity extends AppCompatActivity implements ChooseActivit
private void updateBluetooth() {
// Disable Bluetooth preference if device does not have Bluetooth
BluetoothLeSensorPreference bluetoothPreference = findPreference(getString(R.string.settings_sensor_bluetooth_heart_rate_key));
bluetoothPreference.setVisible(BluetoothUtils.hasBluetooth(TAG));
bluetoothPreference.setVisible(BluetoothUtils.hasBluetooth(getContext()));
}
private void updateUnits() {