Skip to content

Commit

Permalink
ImportActivity: Treat start date as end date if latter is un-specified
Browse files Browse the repository at this point in the history
Signed-off-by: Aayush Gupta <[email protected]>
  • Loading branch information
theimpulson authored and jspricke committed Aug 25, 2023
1 parent f028b64 commit e3da7d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/main/java/com/android/calendar/ImportActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,13 @@ private void parseCalFile() {

String dtEnd = firstEvent.getProperty(VEvent.DTEND);
String dtEndParam = firstEvent.getPropertyParameters(VEvent.DTEND);
if (!TextUtils.isEmpty(dtEnd)) {
if (dtEnd != null && !TextUtils.isEmpty(dtEnd)) {
calIntent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME,
getLocalTimeFromString(dtEnd, dtEndParam));
} else {
// Treat start date as end date if un-specified
dtEnd = dtStart;
dtEndParam = dtStartParam;
}

boolean isAllDay = getLocalTimeFromString(dtEnd, dtEndParam)
Expand Down

0 comments on commit e3da7d1

Please sign in to comment.