diff options
author | Zheng Fu <zhengfu@google.com> | 2015-06-09 16:52:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-09 16:52:35 +0000 |
commit | 039259f7a3fa9cb11e891c878728b6cc0bc80f25 (patch) | |
tree | 2ef513b0c5d399ac745fb55f4b5af07798bbe286 /src | |
parent | 6c3380a5e5d5ce112f4ea5991b1f7136d51e5ce7 (diff) | |
parent | a87f9f49c7f773d9ad0926de5017463d72938dab (diff) | |
download | packages_providers_ContactsProvider-039259f7a3fa9cb11e891c878728b6cc0bc80f25.zip packages_providers_ContactsProvider-039259f7a3fa9cb11e891c878728b6cc0bc80f25.tar.gz packages_providers_ContactsProvider-039259f7a3fa9cb11e891c878728b6cc0bc80f25.tar.bz2 |
Merge "Roll out new aggregator to limited dogfooders." into mnc-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/providers/contacts/ContactsProvider2.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/providers/contacts/ContactsProvider2.java b/src/com/android/providers/contacts/ContactsProvider2.java index 72512b7..c881c65 100644 --- a/src/com/android/providers/contacts/ContactsProvider2.java +++ b/src/com/android/providers/contacts/ContactsProvider2.java @@ -276,7 +276,11 @@ public class ContactsProvider2 extends AbstractContactsProvider private static final String PREF_LOCALE = "locale"; - private static final int PROPERTY_AGGREGATION_ALGORITHM_VERSION = 4; + private static int PROPERTY_AGGREGATION_ALGORITHM_VERSION; + + private static final int AGGREGATION_ALGORITHM_OLD_VERSION = 4; + + private static final int AGGREGATION_ALGORITHM_NEW_VERSION = 5; private static final String AGGREGATE_CONTACTS = "sync.contacts.aggregate"; @@ -1602,6 +1606,11 @@ public class ContactsProvider2 extends AbstractContactsProvider int value = android.provider.Settings.Global.getInt(context.getContentResolver(), Global.NEW_CONTACT_AGGREGATOR, 0); + + // Turn on aggregation algorithm updating process if new aggregator is enabled. + PROPERTY_AGGREGATION_ALGORITHM_VERSION = (value == 0) + ? AGGREGATION_ALGORITHM_OLD_VERSION + : AGGREGATION_ALGORITHM_NEW_VERSION; mContactAggregator = (value == 0) ? new ContactAggregator(this, mContactsHelper, createPhotoPriorityResolver(context), mNameSplitter, mCommonNicknameCache) |