mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
Bugfix: GPS via Bluetooth is not yet support and should therefore not be configurable.
Fixes #2294.
This commit is contained in:
@@ -110,7 +110,7 @@ public class GpsHandler extends SensorHandler<Location, Position> {
|
||||
|
||||
@Override
|
||||
protected int getSensorPreferenceKey() {
|
||||
return R.string.settings_sensor_bluetooth_gps_key;
|
||||
return R.string.settings_sensor_gps_key;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
package de.dennisguse.opentracks.settings.bluetooth;
|
||||
|
||||
import android.content.Context;
|
||||
import android.location.LocationManager;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.core.location.LocationManagerCompat;
|
||||
import androidx.preference.PreferenceDialogFragmentCompat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.dennisguse.opentracks.sensors.driver.GpsInternal;
|
||||
|
||||
public class BluetoothLeGpsPreference extends BluetoothLeSensorPreference {
|
||||
|
||||
public BluetoothLeGpsPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
public BluetoothLeGpsPreference(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public BluetoothLeGpsPreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public BluetoothLeGpsPreference(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PreferenceDialogFragmentCompat createInstance() {
|
||||
boolean hasInternalSensor = LocationManagerCompat.hasProvider((LocationManager) getContext().getSystemService(Context.LOCATION_SERVICE), GpsInternal.LOCATION_PROVIDER);
|
||||
|
||||
return BluetoothLeSensorPreferenceDialog
|
||||
.newInstance(getKey(), List.of(), hasInternalSensor);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -26,9 +26,17 @@
|
||||
<string name="settings_sensor_bluetooth_cycling_power_key" translatable="false">bluetoothCyclingPowerSensor</string>
|
||||
<string name="settings_sensor_bluetooth_running_speed_and_cadence_key" translatable="false">bluetoothRunningSpeedAndCadenceSensor</string>
|
||||
<string name="settings_sensor_bluetooth_pressure_key" translatable="false">bluetoothPressureSensor</string>
|
||||
<string name="settings_sensor_bluetooth_gps_key" translatable="false">bluetoothGPSSensor</string>
|
||||
<string name="settings_sensor_gps_key" translatable="false">bluetoothGPSSensor</string>
|
||||
<string name="sensor_type_value_none" translatable="false">NONE</string>
|
||||
<string name="sensor_type_value_internal" translatable="false">INTERNAL</string>
|
||||
<string-array name="sensor_type_no_bluetooth_entryValues">
|
||||
<item>@string/sensor_type_value_none</item>
|
||||
<item>@string/sensor_type_value_internal</item>
|
||||
</string-array>
|
||||
<string-array name="sensor_type_no_bluetooth_entries">
|
||||
<item>@string/value_none</item>
|
||||
<item>@string/value_internal_sensor</item>
|
||||
</string-array>
|
||||
|
||||
<string name="settings_sensor_bluetooth_cycling_speed_wheel_circumference_key" translatable="false">bluetoothCyclingSpeedWheelCircumference</string>
|
||||
<string name="settings_sensor_bluetooth_cycling_speed_wheel_circumference_default" translatable="false">2135</string>
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
android:title="@string/settings_sensors_title">
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_gps_sensor">
|
||||
<de.dennisguse.opentracks.settings.bluetooth.BluetoothLeGpsPreference
|
||||
<ListPreference
|
||||
android:defaultValue="@string/sensor_type_value_internal"
|
||||
android:key="@string/settings_sensor_bluetooth_gps_key"
|
||||
android:title="@string/settings_gps_sensor" />
|
||||
android:entryValues="@array/sensor_type_no_bluetooth_entryValues"
|
||||
android:entries="@array/sensor_type_no_bluetooth_entries"
|
||||
android:key="@string/settings_sensor_gps_key"
|
||||
android:title="@string/settings_gps_sensor"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
<ListPreference
|
||||
android:defaultValue="@string/min_sampling_interval_default"
|
||||
android:entryValues="@array/min_sampling_interval_values"
|
||||
|
||||
Reference in New Issue
Block a user