public class

ContactAggregator

extends Object
java.lang.Object
   ↳ com.android.providers.contacts.ContactAggregator

Class Overview

ContactAggregator deals with aggregating contact information coming from different sources. Two John Doe contacts from two disjoint sources are presumed to be the same person unless the user declares otherwise.

Summary

Constants
int LOG_SYNC_CONTACTS_AGGREGATION
Public Constructors
ContactAggregator(ContactsProvider2 contactsProvider, ContactsDatabaseHelper contactsDatabaseHelper, PhotoPriorityResolver photoPriorityResolver)
Constructor.
Public Methods
void aggregateContact(SQLiteDatabase db, long rawContactId, String accountType, String accountName, long currentContactId)
Synchronously aggregate the specified contact assuming an open transaction.
void aggregateContact(SQLiteDatabase db, long rawContactId)
void aggregateInTransaction(SQLiteDatabase db)
Aggregate all raw contacts that were marked for aggregation in the current transaction.
void clearPendingAggregations()
void invalidateAggregationExceptionCache()
boolean isEnabled()
void markForAggregation(long rawContactId, int aggregationMode, boolean force)
void markNewForAggregation(long rawContactId, int aggregationMode)
void onRawContactInsert(SQLiteDatabase db, long rawContactId)
Creates a new contact based on the given raw contact.
Cursor queryAggregationSuggestions(SQLiteQueryBuilder qb, String[] projection, long contactId, int maxSuggestions, String filter)
Finds matching contacts and returns a cursor on those.
void setEnabled(boolean enabled)
void updateAggregateData(long contactId)
void updateDisplayNameForContact(SQLiteDatabase db, long contactId)
void updateDisplayNameForRawContact(SQLiteDatabase db, long rawContactId)
void updateHasPhoneNumber(SQLiteDatabase db, long rawContactId)
Updates the HAS_PHONE_NUMBER flag for the aggregate contact containing the specified raw contact.
void updateLookupKeyForContact(SQLiteDatabase db, long contactId)
void updateLookupKeyForRawContact(SQLiteDatabase db, long rawContactId)
void updatePhotoId(SQLiteDatabase db, long rawContactId)
Protected Methods
void updateStarred(long rawContactId)
Execute SQLiteStatement that will update the STARRED flag for the given _ID.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int LOG_SYNC_CONTACTS_AGGREGATION

Constant Value: 2747 (0x00000abb)

Public Constructors

public ContactAggregator (ContactsProvider2 contactsProvider, ContactsDatabaseHelper contactsDatabaseHelper, PhotoPriorityResolver photoPriorityResolver)

Constructor.

Public Methods

public void aggregateContact (SQLiteDatabase db, long rawContactId, String accountType, String accountName, long currentContactId)

Synchronously aggregate the specified contact assuming an open transaction.

public void aggregateContact (SQLiteDatabase db, long rawContactId)

public void aggregateInTransaction (SQLiteDatabase db)

Aggregate all raw contacts that were marked for aggregation in the current transaction. Call just before committing the transaction.

public void clearPendingAggregations ()

public void invalidateAggregationExceptionCache ()

public boolean isEnabled ()

public void markForAggregation (long rawContactId, int aggregationMode, boolean force)

public void markNewForAggregation (long rawContactId, int aggregationMode)

public void onRawContactInsert (SQLiteDatabase db, long rawContactId)

Creates a new contact based on the given raw contact. Does not perform aggregation.

public Cursor queryAggregationSuggestions (SQLiteQueryBuilder qb, String[] projection, long contactId, int maxSuggestions, String filter)

Finds matching contacts and returns a cursor on those.

public void setEnabled (boolean enabled)

public void updateAggregateData (long contactId)

public void updateDisplayNameForContact (SQLiteDatabase db, long contactId)

public void updateDisplayNameForRawContact (SQLiteDatabase db, long rawContactId)

public void updateHasPhoneNumber (SQLiteDatabase db, long rawContactId)

Updates the HAS_PHONE_NUMBER flag for the aggregate contact containing the specified raw contact.

public void updateLookupKeyForContact (SQLiteDatabase db, long contactId)

public void updateLookupKeyForRawContact (SQLiteDatabase db, long rawContactId)

public void updatePhotoId (SQLiteDatabase db, long rawContactId)

Protected Methods

protected void updateStarred (long rawContactId)

Execute SQLiteStatement that will update the STARRED flag for the given _ID.