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

The pre-install calendar support to jump the oldest date is 1970/01/01.
If date set before 1970/01/01, it can't jump to the date.

When we save a birthday or anniversary event for a contact, we
set the year to 0, this means when a user for example clicks a birthday
we will open the day of the coming birthday.

Bug: TBD
Test: Manual
Change-Id: I68d207cddbab53b97c1368048a50cda5d6bd5aa2
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
index 2c0d114..35fc2cc 100644
--- a/src/com/android/contacts/quickcontact/QuickContactActivity.java
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -1484,6 +1484,11 @@
             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();