Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34c779a7 authored by Fahim M. Choudhury's avatar Fahim M. Choudhury
Browse files

Merge branch '7948-r-recurrence-support-importing-ics' into 'v1-r'

feat: add recurrence rule support for importing calendar event from .ics file [v1-r]

See merge request !73
parents c6113b08 5a056ca7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -158,6 +158,8 @@ public class ImportActivity extends Activity {
                IcalendarUtils.uncleanseString(firstEvent.getProperty(VEvent.DESCRIPTION)));
        calIntent.putExtra(CalendarContract.Events.ORGANIZER,
                IcalendarUtils.uncleanseString(firstEvent.getProperty(VEvent.ORGANIZER)));
        calIntent.putExtra(CalendarContract.Events.RRULE,
                IcalendarUtils.uncleanseString(firstEvent.getProperty(VEvent.RRULE)));

        if (firstEvent.mAttendees.size() > 0) {
            StringBuilder builder = new StringBuilder();
+2 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ public class VEvent {
    public static String DESCRIPTION = "DESCRIPTION";
    public static String ATTENDEE = "ATTENDEE";
    public static String CATEGORIES = "CATEGORIES";
    public static String RRULE = "RRULE"; // Recurrence rule, example: FREQ=WEEKLY;COUNT=10;BYDAY=MO

    // Stores the -arity of the attributes that this component can have
    private static HashMap<String, Integer> sPropertyList = new HashMap<String, Integer>();
@@ -66,10 +67,10 @@ public class VEvent {
        sPropertyList.put(DTSTAMP,1);
        sPropertyList.put(SUMMARY,1);
        sPropertyList.put(DESCRIPTION,1);

        sPropertyList.put(ATTENDEE, Integer.MAX_VALUE);
        sPropertyList.put(CATEGORIES, Integer.MAX_VALUE);
        sPropertyList.put(CATEGORIES, Integer.MAX_VALUE);
        sPropertyList.put(RRULE, 1);
    }

    // Stores attributes and their corresponding values belonging to the Event component