java.lang.Object | |
↳ | com.android.providers.contacts.ContactMatcher |
Logic for matching contacts' data and accumulating match scores.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ContactMatcher.MatchScore | Captures the max score and match count for a specific contact. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float | APPROXIMATE_MATCH_THRESHOLD | ||||||||||
float | APPROXIMATE_MATCH_THRESHOLD_FOR_EMAIL | ||||||||||
int | MATCHING_ALGORITHM_APPROXIMATE | ||||||||||
int | MATCHING_ALGORITHM_CONSERVATIVE | ||||||||||
int | MATCHING_ALGORITHM_EXACT | ||||||||||
int | MAX_SCORE | ||||||||||
long | MULTIPLE_MATCHES | ||||||||||
int | SCORE_THRESHOLD_PRIMARY | ||||||||||
int | SCORE_THRESHOLD_SECONDARY | ||||||||||
int | SCORE_THRESHOLD_SUGGEST |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks if there is a match and updates the overall score for the
specified contact for a discovered match.
| |||||||||||
Returns the contactId with the best match score over the specified threshold or -1
if no such contact is found.
| |||||||||||
Returns matches in the order of descending score.
| |||||||||||
Returns a list of IDs for contacts that are matched on secondary data elements
(phone number, email address, nickname).
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Checks if there is a match and updates the overall score for the specified contact for a discovered match. The new score is determined by the prior score, by the type of name we were looking for, the type of name we found and, if the match is approximate, the distance between the candidate and actual name.
Returns the contactId with the best match score over the specified threshold or -1 if no such contact is found.
Returns matches in the order of descending score.
Returns a list of IDs for contacts that are matched on secondary data elements (phone number, email address, nickname). We still need to obtain the approximate primary score for those contacts to determine if any of them should be aggregated.
May return null.