forked from upstream-mirrors/OpenTracks
@@ -274,6 +274,10 @@ public class PreferencesUtils {
|
||||
return getString(R.string.settings_sensor_bluetooth_heart_rate_key, getBluetoothSensorAddressNone());
|
||||
}
|
||||
|
||||
public static String getBluetoothTemperatureSensorAddress() {
|
||||
return getString(R.string.settings_sensor_bluetooth_temperature_key, getBluetoothSensorAddressNone());
|
||||
}
|
||||
|
||||
public static String getBluetoothCyclingCadenceSensorAddress() {
|
||||
return getString(R.string.settings_sensor_bluetooth_cycling_cadence_key, getBluetoothSensorAddressNone());
|
||||
}
|
||||
@@ -830,7 +834,8 @@ public class PreferencesUtils {
|
||||
R.array.stats_custom_layout_fields_default_value_17,
|
||||
R.array.stats_custom_layout_fields_default_value_18,
|
||||
R.array.stats_custom_layout_fields_default_value_19,
|
||||
R.array.stats_custom_layout_fields_default_value_20
|
||||
R.array.stats_custom_layout_fields_default_value_20,
|
||||
R.array.stats_custom_layout_fields_default_value_21
|
||||
).map(id -> resources.obtainTypedArray(id))
|
||||
.toList();
|
||||
}
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package de.dennisguse.opentracks.settings.bluetooth;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.preference.PreferenceDialogFragmentCompat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.dennisguse.opentracks.sensors.BluetoothHandlerTemperature;
|
||||
|
||||
public class BluetoothLeTemperaturePreference extends BluetoothLeSensorPreference {
|
||||
|
||||
public BluetoothLeTemperaturePreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
public BluetoothLeTemperaturePreference(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public BluetoothLeTemperaturePreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public BluetoothLeTemperaturePreference(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PreferenceDialogFragmentCompat createInstance() {
|
||||
return BluetoothLeSensorPreferenceDialog
|
||||
.newInstance(getKey(), List.of(BluetoothHandlerTemperature.TEMPERATURE));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user