|
|
@ -75,13 +75,19 @@ public class FragmentDialogCalendar extends FragmentDialogBase {
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
CalendarContract.Calendars.ACCOUNT_NAME)) {
|
|
|
|
CalendarContract.Calendars.ACCOUNT_NAME)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int colId = cursor.getColumnIndexOrThrow(CalendarContract.Calendars._ID);
|
|
|
|
|
|
|
|
int colAccount = cursor.getColumnIndexOrThrow(CalendarContract.Calendars.ACCOUNT_NAME);
|
|
|
|
|
|
|
|
int colType = cursor.getColumnIndexOrThrow(CalendarContract.Calendars.ACCOUNT_TYPE);
|
|
|
|
|
|
|
|
int colPrimary = cursor.getColumnIndexOrThrow(CalendarContract.Calendars.IS_PRIMARY);
|
|
|
|
|
|
|
|
int colVisible = cursor.getColumnIndexOrThrow(CalendarContract.Calendars.VISIBLE);
|
|
|
|
|
|
|
|
int colDisplay = cursor.getColumnIndexOrThrow(CalendarContract.Calendars.CALENDAR_DISPLAY_NAME);
|
|
|
|
while (cursor.moveToNext()) {
|
|
|
|
while (cursor.moveToNext()) {
|
|
|
|
long id = cursor.getLong(0);
|
|
|
|
long id = cursor.getLong(colId);
|
|
|
|
String account = cursor.getString(1);
|
|
|
|
String account = cursor.getString(colAccount);
|
|
|
|
String type = cursor.getString(2);
|
|
|
|
String type = cursor.getString(colType);
|
|
|
|
boolean primary = (cursor.getInt(3) != 0);
|
|
|
|
boolean primary = (cursor.getInt(colPrimary) != 0);
|
|
|
|
boolean visible = (cursor.getInt(4) != 0);
|
|
|
|
boolean visible = (cursor.getInt(colVisible) != 0);
|
|
|
|
String name = cursor.getString(5);
|
|
|
|
String name = cursor.getString(colDisplay);
|
|
|
|
if (account != null)
|
|
|
|
if (account != null)
|
|
|
|
calendars.add(new Calendar(id, account, type, primary, visible, name));
|
|
|
|
calendars.add(new Calendar(id, account, type, primary, visible, name));
|
|
|
|
}
|
|
|
|
}
|
|
|
|