Added ICS description to calendar intent

This commit is contained in:
M66B 2020-01-26 18:08:49 +01:00
parent 2874c994db
commit f89c5546cc
1 changed files with 8 additions and 4 deletions

View File

@ -1966,12 +1966,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
VEvent event = icalendar.getEvents().get(0); VEvent event = icalendar.getEvents().get(0);
if (action == R.id.ibCalendar) { if (action == R.id.ibCalendar) {
String summary = event.getSummary() == null ? null : event.getSummary().getValue(); String summary = (event.getSummary() == null ? null : event.getSummary().getValue());
String description = (event.getDescription() == null ? null : event.getDescription().getValue());
ICalDate start = event.getDateStart() == null ? null : event.getDateStart().getValue(); ICalDate start = (event.getDateStart() == null ? null : event.getDateStart().getValue());
ICalDate end = event.getDateEnd() == null ? null : event.getDateEnd().getValue(); ICalDate end = (event.getDateEnd() == null ? null : event.getDateEnd().getValue());
String location = event.getLocation() == null ? null : event.getLocation().getValue(); String location = (event.getLocation() == null ? null : event.getLocation().getValue());
List<String> attendee = new ArrayList<>(); List<String> attendee = new ArrayList<>();
for (Attendee a : event.getAttendees()) { for (Attendee a : event.getAttendees()) {
@ -1988,6 +1989,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (summary != null) if (summary != null)
intent.putExtra(CalendarContract.Events.TITLE, summary); intent.putExtra(CalendarContract.Events.TITLE, summary);
if (description != null)
intent.putExtra(CalendarContract.Events.DESCRIPTION, description);
if (start != null) if (start != null)
intent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, start.getTime()); intent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, start.getTime());