diff --git a/src/main/java/de/dennisguse/opentracks/settings/SensorsSettingsFragment.java b/src/main/java/de/dennisguse/opentracks/settings/SensorsSettingsFragment.java index 20fa8cc42..3f39f6377 100644 --- a/src/main/java/de/dennisguse/opentracks/settings/SensorsSettingsFragment.java +++ b/src/main/java/de/dennisguse/opentracks/settings/SensorsSettingsFragment.java @@ -52,9 +52,9 @@ public void onDisplayPreferenceDialog(Preference preference) { private void setWheelCircumferenceInputFilter() { EditTextPreference wheelPreference = findPreference(getString(R.string.settings_sensor_bluetooth_cycling_speed_wheel_circumference_key)); wheelPreference.setOnPreferenceChangeListener((preference, newValue) -> { - if (newValue instanceof String string) { + if (newValue instanceof String) { try { - int newValueInt = Integer.parseInt(string); + int newValueInt = Integer.parseInt((String) newValue); return newValueInt >= 100 && newValueInt < 4000; } catch (NumberFormatException e) { Log.w(TAG, "Entered string is no number.");