1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-02-18 05:17:08 +01:00

Fix conversion from String to Integer

This commit is contained in:
Felix Konstantin Maurer 2018-01-24 15:02:25 +01:00 committed by Andreas Shimokawa
parent 32dcdc24ba
commit 296dfe2f17

View File

@ -308,10 +308,10 @@ public class SettingsActivity extends AbstractSettingsActivity {
public boolean onPreferenceChange(Preference preference, Object autoExportInterval) { public boolean onPreferenceChange(Preference preference, Object autoExportInterval) {
String summary = String.format( String summary = String.format(
getApplicationContext().getString(R.string.pref_summary_auto_export_interval), getApplicationContext().getString(R.string.pref_summary_auto_export_interval),
(int) autoExportInterval); Integer.valueOf((String) autoExportInterval));
preference.setSummary(summary); preference.setSummary(summary);
boolean auto_export_enabled = GBApplication.getPrefs().getBoolean(GBPrefs.AUTO_EXPORT_ENABLED, false); boolean auto_export_enabled = GBApplication.getPrefs().getBoolean(GBPrefs.AUTO_EXPORT_ENABLED, false);
PeriodicExporter.sheduleAlarm(getApplicationContext(), (int) autoExportInterval, auto_export_enabled); PeriodicExporter.sheduleAlarm(getApplicationContext(), Integer.valueOf((String) autoExportInterval), auto_export_enabled);
return true; return true;
} }
}); });