diff --git a/astrid/plugin-src/com/todoroo/astrid/reminders/ReminderPreferences.java b/astrid/plugin-src/com/todoroo/astrid/reminders/ReminderPreferences.java index 26e35264e..3f3780cfd 100644 --- a/astrid/plugin-src/com/todoroo/astrid/reminders/ReminderPreferences.java +++ b/astrid/plugin-src/com/todoroo/astrid/reminders/ReminderPreferences.java @@ -54,8 +54,12 @@ public class ReminderPreferences extends TodorooPreferenceActivity { } } else if(r.getString(R.string.p_rmd_time).equals(preference.getKey())) { int index = AndroidUtilities.indexOf(r.getStringArray(R.array.EPr_rmd_time_values), (String)value); - String setting = r.getStringArray(R.array.EPr_rmd_time)[index]; - preference.setSummary(r.getString(R.string.rmd_EPr_rmd_time_desc, setting)); + if (index != -1 && index < r.getStringArray(R.array.EPr_rmd_time).length) { + // FIXME this does not fix the underlying cause of the ArrayIndexOutofBoundsException + // https://www.crittercism.com/developers/crash-details/e0886dbfcf9e78a21d9f2e2a385c4c13e2f6ad2132ac24a3fa811144 + String setting = r.getStringArray(R.array.EPr_rmd_time)[index]; + preference.setSummary(r.getString(R.string.rmd_EPr_rmd_time_desc, setting)); + } } else if(r.getString(R.string.p_rmd_ringtone).equals(preference.getKey())) { if(value == null || "content://settings/system/notification_sound".equals(value)) //$NON-NLS-1$ preference.setSummary(r.getString(R.string.rmd_EPr_ringtone_desc_default));