summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZheng Fu <zhengfu@google.com>2015-07-17 16:38:43 -0700
committerZheng Fu <zhengfu@google.com>2015-07-17 16:41:36 -0700
commite5bd832dd7743f98fd816f7e6568f715015764bd (patch)
treec2a3898cbd556a8e5ec6fc69722ed5378c2e2502 /src
parentf3d2981b53b7d4715da1d35f5425b19766a92f8b (diff)
downloadpackages_providers_ContactsProvider-e5bd832dd7743f98fd816f7e6568f715015764bd.zip
packages_providers_ContactsProvider-e5bd832dd7743f98fd816f7e6568f715015764bd.tar.gz
packages_providers_ContactsProvider-e5bd832dd7743f98fd816f7e6568f715015764bd.tar.bz2
Fix failing tests due to logic changes in the new aggregator.
1. All the raw contacts with same name and no data will group together, so we need to assign different names in this test. 2. We don't have split step anymore, so there is no unpin operation. 3. Fix Long comparison in the aggregator. Bug:22566083 Change-Id: I1a963bf17866e7569012e4cceca034e7c8312aa3
Diffstat (limited to 'src')
-rw-r--r--src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java2
-rw-r--r--src/com/android/providers/contacts/aggregation/ContactAggregator2.java2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java b/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java
index c18c1d6..5895f51 100644
--- a/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java
+++ b/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java
@@ -867,8 +867,6 @@ public abstract class AbstractContactAggregator {
contactId = mContactInsert.executeInsert();
}
for (Long rawContactId : rawContactIds) {
- // Regrouped contacts should automatically be unpinned.
- unpinRawContact(rawContactId);
setContactIdAndMarkAggregated(rawContactId, contactId);
setPresenceContactId(rawContactId, contactId);
}
diff --git a/src/com/android/providers/contacts/aggregation/ContactAggregator2.java b/src/com/android/providers/contacts/aggregation/ContactAggregator2.java
index 9beb6c2..5372bbd 100644
--- a/src/com/android/providers/contacts/aggregation/ContactAggregator2.java
+++ b/src/com/android/providers/contacts/aggregation/ContactAggregator2.java
@@ -340,7 +340,7 @@ public class ContactAggregator2 extends AbstractContactAggregator {
contactId = currentCidForRawContact;
for (Long connectedRawContactId : connectedRawContactIds) {
Long cid = matchingCandidates.getContactId(connectedRawContactId);
- if (cid != null && cid != contactId) {
+ if (cid != null && !cid.equals(contactId)) {
cidsNeedToBeUpdated.add(cid);
}
}