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

Commit 548f5ceb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Cannot open date before 1970/01/01 from quickcontact screen"

parents 8df75ccc adc75383
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1484,6 +1484,11 @@ public class QuickContactActivity extends ContactsActivity {
            final String dataString = event.buildDataStringForDisplay(context, kind);
            final Calendar cal = DateUtils.parseDate(dataString, false);
            if (cal != null) {
                final int eventType = event.getContentValues().getAsInteger(Event.TYPE);
                if (eventType == Event.TYPE_ANNIVERSARY || eventType == Event.TYPE_BIRTHDAY) {
                    // setting the year to 0 makes a click open the coming birthday
                    cal.set(Calendar.YEAR, 0);
                }
                final Date nextAnniversary =
                        DateUtils.getNextAnnualDate(cal);
                final Uri.Builder builder = CalendarContract.CONTENT_URI.buildUpon();