CharSequence[] entries = getEntries();
CharSequence[] entryValues = getEntryValues();
if (entries == null || entryValues == null) {
throw new IllegalStateException(
"RepeatPreference requires an entries array and an entryValues array.");
}
mDaysOfWeek.set(mOnRepeatChangedObserver.getDaysOfWeek());
builder.setMultiChoiceItems(
entries, mDaysOfWeek.getBooleanArray(),
new DialogInterface.OnMultiChoiceClickListener() {
public void onClick(DialogInterface dialog, int which, boolean isChecked) {
mDaysOfWeek.set(which, isChecked);
}
});