diff options
author | Zheng Fu <zhengfu@google.com> | 2015-07-30 21:58:50 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-30 21:58:50 +0000 |
commit | 657beb09e926322adc3774eee47c84fee6be9c11 (patch) | |
tree | b11bb15b2017faaba23a5b9d382461c3344d2aa0 | |
parent | 5a47ebdd14cc867da587e4a5a4f3ac923fbc9b57 (diff) | |
parent | f40e1d68eac8359c371a953a8cd144f21f67cfff (diff) | |
download | packages_providers_ContactsProvider-657beb09e926322adc3774eee47c84fee6be9c11.zip packages_providers_ContactsProvider-657beb09e926322adc3774eee47c84fee6be9c11.tar.gz packages_providers_ContactsProvider-657beb09e926322adc3774eee47c84fee6be9c11.tar.bz2 |
am f40e1d68: am 63a78131: Don\'t show aggregation suggestions for contacts itself.
* commit 'f40e1d68eac8359c371a953a8cd144f21f67cfff':
Don't show aggregation suggestions for contacts itself.
-rw-r--r-- | src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java b/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java index 5895f51..1fb6381 100644 --- a/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java +++ b/src/com/android/providers/contacts/aggregation/AbstractContactAggregator.java @@ -16,28 +16,6 @@ package com.android.providers.contacts.aggregation; -import android.database.Cursor; -import android.database.DatabaseUtils; -import android.database.sqlite.SQLiteDatabase; -import android.database.sqlite.SQLiteQueryBuilder; -import android.database.sqlite.SQLiteStatement; -import android.net.Uri; -import android.provider.ContactsContract.AggregationExceptions; -import android.provider.ContactsContract.CommonDataKinds.Email; -import android.provider.ContactsContract.CommonDataKinds.Identity; -import android.provider.ContactsContract.CommonDataKinds.Phone; -import android.provider.ContactsContract.CommonDataKinds.Photo; -import android.provider.ContactsContract.Contacts; -import android.provider.ContactsContract.Data; -import android.provider.ContactsContract.DisplayNameSources; -import android.provider.ContactsContract.FullNameStyle; -import android.provider.ContactsContract.PhotoFiles; -import android.provider.ContactsContract.PinnedPositions; -import android.provider.ContactsContract.RawContacts; -import android.provider.ContactsContract.StatusUpdates; -import android.text.TextUtils; -import android.util.EventLog; -import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import com.android.providers.contacts.ContactLookupKey; import com.android.providers.contacts.ContactsDatabaseHelper; @@ -69,6 +47,29 @@ import com.google.android.collect.Maps; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; +import android.database.Cursor; +import android.database.DatabaseUtils; +import android.database.sqlite.SQLiteDatabase; +import android.database.sqlite.SQLiteQueryBuilder; +import android.database.sqlite.SQLiteStatement; +import android.net.Uri; +import android.provider.ContactsContract.AggregationExceptions; +import android.provider.ContactsContract.CommonDataKinds.Email; +import android.provider.ContactsContract.CommonDataKinds.Identity; +import android.provider.ContactsContract.CommonDataKinds.Phone; +import android.provider.ContactsContract.CommonDataKinds.Photo; +import android.provider.ContactsContract.Contacts; +import android.provider.ContactsContract.Data; +import android.provider.ContactsContract.DisplayNameSources; +import android.provider.ContactsContract.FullNameStyle; +import android.provider.ContactsContract.PhotoFiles; +import android.provider.ContactsContract.PinnedPositions; +import android.provider.ContactsContract.RawContacts; +import android.provider.ContactsContract.StatusUpdates; +import android.text.TextUtils; +import android.util.EventLog; +import android.util.Log; + import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -1931,7 +1932,7 @@ public abstract class AbstractContactAggregator { Set<Long> contactIds = new HashSet<>(); for (MatchScore bestMatch : bestMatches) { long cid = bestMatch.getContactId(); - if (!contactIds.contains(cid)) { + if (!contactIds.contains(cid) && cid != contactId) { bestMatchesWithoutDuplicateContactIds.add(bestMatch); contactIds.add(cid); } |