From b7fd90e9976d21301a99bdaf9a9a4ead14689a01 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Wed, 29 May 2013 12:22:56 +0300 Subject: [PATCH] Add calendarID field to Event --- src/ro/ieval/unical/Event.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ro/ieval/unical/Event.java b/src/ro/ieval/unical/Event.java index 095d07a..66872af 100644 --- a/src/ro/ieval/unical/Event.java +++ b/src/ro/ieval/unical/Event.java @@ -12,7 +12,7 @@ final class Event implements Parcelable{ public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { @Override public Event createFromParcel(Parcel source) { - return new Event(source.readLong(), source.readString(), source.readString(), source.readString(), source.readString(), source.readInt(), source.readLong(), source.readLong()); + return new Event(source.readLong(), source.readString(), source.readString(), source.readString(), source.readString(), source.readInt(), source.readLong(), source.readLong(), source.readLong()); } @Override @@ -30,7 +30,7 @@ final class Event implements Parcelable{ Events.EVENT_COLOR, Events.DTSTART, Events.DTEND, - + Events.CALENDAR_ID, }; /** Event ID */ @@ -49,8 +49,10 @@ final class Event implements Parcelable{ public final long dtstart; /** Event end time (UTC milliseconds since epoch) */ public final long dtend; + /** Calendar ID */ + public final long calendarID; - private Event(final long _id, final String organizer, final String title, final String eventLocation, final String description, final int eventColor, final long dtstart, final long dtend) { + private Event(final long _id, final String organizer, final String title, final String eventLocation, final String description, final int eventColor, final long dtstart, final long dtend, final long calendarID) { this._id=_id; this.organizer=organizer; this.title=title; @@ -59,6 +61,7 @@ final class Event implements Parcelable{ this.eventColour=eventColor; this.dtstart=dtstart; this.dtend=dtend; + this.calendarID=calendarID; } public static Event[] getEventsByCalendar(final Context context, final int calendarID){ @@ -71,7 +74,7 @@ final class Event implements Parcelable{ cursor.moveToFirst(); final Event[] events = new Event[cursor.getCount()]; for(int i=0;i