Symptom-fix for ArrayIndexOutOfBoundsException.

Presumably happening during focusGain of the ReminderPreferences-activity for the default-remindertime settting.
Details:
https://www.crittercism.com/developers/crash-details/e0886dbfcf9e78a21d9f2e2a385c4c13e2f6ad2132ac24a3fa811144
pull/14/head
Arne Jans 13 years ago
parent fbaa2203b4
commit 3635dab3ba

@ -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);
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));

Loading…
Cancel
Save