aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitri Plotnikov <dplotnikov@google.com>2010-10-13 17:59:48 -0700
committerDmitri Plotnikov <dplotnikov@google.com>2010-10-13 17:59:48 -0700
commit72c7667755dfabba69a2afa479185a3ab458e948 (patch)
treebd5ed2390d3e05d1f71e2ba44478659a7f471729
parentcfdc0773948fb9788f31495eb876fae3a069eb3a (diff)
downloadContactsProvider-72c7667755dfabba69a2afa479185a3ab458e948.tar.gz
Making aggregation exceptions override the not-from-same-account rule
We now have a rule that we won't let contacts from the same account to get aggregated. This rule should NOT apply to manual aggregation. Bug: 3095300 Change-Id: Idb6bdf54214cec46c72bf681e6f980ac0d293386
-rw-r--r--src/com/android/providers/contacts/ContactAggregator.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/android/providers/contacts/ContactAggregator.java b/src/com/android/providers/contacts/ContactAggregator.java
index a4b5c21e..b3a3baad 100644
--- a/src/com/android/providers/contacts/ContactAggregator.java
+++ b/src/com/android/providers/contacts/ContactAggregator.java
@@ -535,15 +535,15 @@ public class ContactAggregator {
contactId = pickBestMatchBasedOnExceptions(db, rawContactId, matcher);
if (contactId == -1) {
contactId = pickBestMatchBasedOnData(db, rawContactId, candidates, matcher);
- }
- // If we found an aggregate to join, but it already contains raw contacts from
- // the same account, not only will we not join it, but also we will split
- // that other aggregate
- if (contactId != -1
- && containsRawContactsFromAccount(db, contactId, accountType, accountName)) {
- contactIdToSplit = contactId;
- contactId = -1;
+ // If we found an aggregate to join, but it already contains raw contacts from
+ // the same account, not only will we not join it, but also we will split
+ // that other aggregate
+ if (contactId != -1 && containsRawContactsFromAccount(
+ db, contactId, accountType, accountName)) {
+ contactIdToSplit = contactId;
+ contactId = -1;
+ }
}
} else if (aggregationMode == RawContacts.AGGREGATION_MODE_DISABLED) {
return;