diff options
author | Yorke Lee <yorkelee@google.com> | 2013-04-30 12:51:12 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2013-04-30 16:17:21 -0700 |
commit | ec2a6103d517a1896abffc493e5f883049872ca9 (patch) | |
tree | d9bdc299d89d60364954e50bcebba85e75f33344 /res | |
parent | 1d6fb57f3a53db34bfcb3dacdf11bcb6fb091b06 (diff) |
Fix Smart dialing OOM for extremely long contacts
Names with an extremely large number of name tokens were
using exponentially increasing amounts of memory since we have
to insert entries for all possible initial name combinations.
Added a check in the trie insertion algorithm to only add initial
matches for the 1st 2, and the last 2 name tokens.
This change only affects search by initial matches for names exceeding
4 name tokens. Full token search for names of all lengths should still
work. E.g. "frank", "enstein" would still match "Dr Frank En Stein DDS".
However initial matching would be limited to the first 2 and last 2 tokens.
So "dfsd" or "fsd" would work, but "fes" or "fed" would not.
Also fixes a bug caused by integer overflow when calculating thresholds
for bucketing frequently used contacts
Bug 8737986
Change-Id: I804184368b78fe2fa407667ed83874d839c28115
Diffstat (limited to 'res')
0 files changed, 0 insertions, 0 deletions