import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
+import android.provider.BaseColumns;
import android.provider.CalendarContract;
import android.provider.CalendarContract.Attendees;
final class Attendee {
private static final String[] PROJECTION = {
- Attendees._ID,
+ BaseColumns._ID,
Attendees.EVENT_ID,
Attendees.ATTENDEE_NAME,
Attendees.ATTENDEE_EMAIL,
attendees[i]=new Attendee(cursor.getLong(0), cursor.getLong(1), cursor.getString(2), cursor.getString(3), cursor.getInt(4), cursor.getInt(5), cursor.getInt(6));
cursor.moveToNext();
}
+ cursor.close();
return attendees;
}
}
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
+import android.provider.BaseColumns;
import android.provider.CalendarContract.Calendars;
final class Calendar {
private static final String[] PROJECTION = {
- Calendars._ID,
+ BaseColumns._ID,
Calendars.NAME,
Calendars.CALENDAR_DISPLAY_NAME,
Calendars.VISIBLE,
calendars[i]=new Calendar(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getInt(3)!=0, cursor.getString(4), cursor.getString(5));
cursor.moveToNext();
}
+ cursor.close();
return calendars;
}
}
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setMessage(R.string.askdeleteevent)
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
- public void onClick(final DialogInterface dialog, final int id) {
+ @Override
+ public void onClick(final DialogInterface dialog, final int id) {
}
})
.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
- public void onClick(final DialogInterface dialog, final int id) {
+ @Override
+ public void onClick(final DialogInterface dialog, final int id) {
// User cancelled the dialog
}
});
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
+import android.provider.BaseColumns;
import android.provider.CalendarContract.Events;
final class Event implements Parcelable{
};
private static final String[] PROJECTION = {
- Events._ID,
+ BaseColumns._ID,
Events.ORGANIZER,
Events.TITLE,
Events.EVENT_LOCATION,
events[i]=new Event(cursor.getLong(0), cursor.getString(1), cursor.getString(2), cursor.getString(3), cursor.getString(4), cursor.getInt(5), cursor.getLong(6), cursor.getLong(7), cursor.getLong(8));
cursor.moveToNext();
}
+ cursor.close();
return events;
}