summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/common/model/dataitem/EventDataItem.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/contacts/common/model/dataitem/EventDataItem.java')
-rw-r--r--src/com/android/contacts/common/model/dataitem/EventDataItem.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/contacts/common/model/dataitem/EventDataItem.java b/src/com/android/contacts/common/model/dataitem/EventDataItem.java
index aae00e97..5096fea2 100644
--- a/src/com/android/contacts/common/model/dataitem/EventDataItem.java
+++ b/src/com/android/contacts/common/model/dataitem/EventDataItem.java
@@ -20,6 +20,7 @@ import android.content.ContentValues;
import android.content.Context;
import android.provider.ContactsContract;
import android.provider.ContactsContract.CommonDataKinds.Event;
+import android.text.TextUtils;
/**
* Represents an event data item, wrapping the columns in
@@ -46,12 +47,14 @@ public class EventDataItem extends DataItem {
}
final EventDataItem that = (EventDataItem) t;
// Events can be different (anniversary, birthday) but have the same start date
- if (!getStartDate().equals(that.getStartDate())) {
+ if (!TextUtils.equals(getStartDate(), that.getStartDate())) {
return false;
+ } else if (!hasKindTypeColumn(mKind) || !that.hasKindTypeColumn(that.getDataKind())) {
+ return hasKindTypeColumn(mKind) == that.hasKindTypeColumn(that.getDataKind());
} else if (getKindTypeColumn(mKind) != that.getKindTypeColumn(that.getDataKind())) {
return false;
} else if (getKindTypeColumn(mKind) == Event.TYPE_CUSTOM &&
- !getLabel().equals(that.getLabel())) {
+ !TextUtils.equals(getLabel(), that.getLabel())) {
// Check if custom types are not the same
return false;
}