Don't check DataKind objects when comparing DataActions; mimetype is enough
Bug:5225995
Change-Id: Icf9262e0211f560c4e994281916e99c3115ce295
diff --git a/src/com/android/contacts/quickcontact/DataAction.java b/src/com/android/contacts/quickcontact/DataAction.java
index f7bf6ed..2066997 100644
--- a/src/com/android/contacts/quickcontact/DataAction.java
+++ b/src/com/android/contacts/quickcontact/DataAction.java
@@ -293,16 +293,13 @@
Log.e(TAG, "t must be DataAction");
return false;
}
- DataAction other = (DataAction)t;
- if (!ContactsUtils.areObjectsEqual(mKind, other.mKind)) {
+ DataAction that = (DataAction)t;
+ if (!ContactsUtils.shouldCollapse(mContext, mMimeType, mBody, that.mMimeType,
+ that.mBody)) {
return false;
}
- if (!ContactsUtils.shouldCollapse(mContext, mMimeType, mBody, other.mMimeType,
- other.mBody)) {
- return false;
- }
- if (!TextUtils.equals(mMimeType, other.mMimeType)
- || !ContactsUtils.areIntentActionEqual(mIntent, other.mIntent)) {
+ if (!TextUtils.equals(mMimeType, that.mMimeType)
+ || !ContactsUtils.areIntentActionEqual(mIntent, that.mIntent)) {
return false;
}
return true;