summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java3
-rw-r--r--src/com/android/providers/contacts/aggregation/ContactAggregator2.java6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java b/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java
index 6948f23..dd0e5aa 100644
--- a/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java
+++ b/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java
@@ -1021,7 +1021,8 @@ public abstract class AbstractContactAggregator {
+ " AND " + RawContacts.CONTACT_ID + " IN " + Tables.DEFAULT_DIRECTORY;
final String[] COLUMNS = new String[] {
- RawContacts._ID, RawContacts.CONTACT_ID, RawContactsColumns.ACCOUNT_ID
+ RawContactsColumns.CONCRETE_ID, RawContacts.CONTACT_ID,
+ RawContactsColumns.ACCOUNT_ID
};
int RAW_CONTACT_ID = 0;
diff --git a/src/com/android/providers/contacts/aggregation/ContactAggregator2.java b/src/com/android/providers/contacts/aggregation/ContactAggregator2.java
index ce54bec..d048609 100644
--- a/src/com/android/providers/contacts/aggregation/ContactAggregator2.java
+++ b/src/com/android/providers/contacts/aggregation/ContactAggregator2.java
@@ -228,7 +228,8 @@ public class ContactAggregator2 extends AbstractContactAggregator {
final RawContactMatchingCandidates matchingCandidates = new RawContactMatchingCandidates(
matcher.pickBestMatches(SCORE_THRESHOLD_SUGGEST));
- Set<Long> newIds = matchingCandidates.getRawContactIdSet();
+ Set<Long> newIds = new HashSet<>();
+ newIds.addAll(matchingCandidates.getRawContactIdSet());
// Keep doing the following until no new raw contact candidate is found.
// TODO: may need to cache the matching score to improve performance.
while (!newIds.isEmpty()) {
@@ -246,7 +247,8 @@ public class ContactAggregator2 extends AbstractContactAggregator {
}
}
}
- newIds = tmpIdSet;
+ newIds.clear();
+ newIds.addAll(tmpIdSet);
}
return matchingCandidates;
}