History log of /packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
084a9d5ee564c758ff7709690ab404d6ac58e78d 04-Jul-2012 Mathew Inwood <mathewi@google.com> Don't sort contacts supplied to global search app.

They are to be sorted by the global search app itself instead.

While we're at it, also remove 'create contact' and 'dial number'
suggestions since they're not used.

Change-Id: I0c56f638e347d101468e22d8fb2417552891eaa9
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
57e70bb3e70f9fe9b2916696fae45e686f567592 07-Feb-2012 Daniel Lehmann <lehmannd@google.com> Reset suggestion fields before reusing the object.

This avoids leaking data from one suggestion into the next for
option attributes.

Bug:5845926
Change-Id: I6c70cb042bf4b92c1e5fd80e8da96d625ef7f7db
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
fa5cdd337d4d696d326db03c68bfae8645c83b14 21-Nov-2011 Mathew Inwood <mathewi@google.com> Unify and improve isPhoneNumber checks.

- Unify GlobalSearchSupport and ContactsProvider2 isPhoneNumber methods
- Improve phone number recognition for gloval search, using the detected
current country and the SIM country.
- Show 'Create contact' and 'Dial number' suggestion in global search
if there's a contact match too. Otherwise, you can't dial a number
that happens to be a substring of a contacts number.
- Move isVoiceCapable check from GlobalSearchSupport into ContactsProviders
to resolve some testing issues.
- Show 'Create contact' suggestions on tablets.

Bug: 5554109

Change-Id: Ie0afee2a97d7551a267482970f5e0615f1775c7d
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
20e99644372a288beabe8d9d9481f34e2f4045d8 22-Aug-2011 Mark Brophy <mbrophy@google.com> Handle complex phone numbers in ContactsProvider.

Use i18n.phonenumber.PhoneNumberUtil to check whether the query is a
phone number.

Bug: 5396858
Change-Id: If389f6d996c6789630d91834d45778f420c6dde3
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
873d6bed8f795a0f4b75560ecbe92feade516514 23-Sep-2011 Mathew Inwood <mathewi@google.com> Don't return 'dial' suggesitons if we're not voice capable.

Bug: 5317968
Change-Id: I52f9694de9781d0221e37078715398df69ae0354
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
b3a1271feb57be104aabe8046846da0071a1f23e 02-Sep-2011 Isaac Katzenelson <isaack@android.com> Fix snippetizing cursor

Bug: 5217242 Email address with the found "snippet" highlighted should
be displayed on the second line below the contact name
Provider size fix:
Added support for deferred_snippeting parameter to URI.
Replaced the cursor wrapper with a code that inserts a bundle into the cursor
for client side snippeting

Change-Id: I1f411071d3d8552eab3c41303d1a99ab6fe0a801
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
5d0a768b56ed4bd0dfef81b8389247ba74766659 08-Aug-2011 Dave Santoro <dsantoro@google.com> Separate the profile out into a separate database.

Fundamentally, this works as follows:
1. A separate, structurally identical database is created for
storing profile data. The view columns for identifying whether
a contact or raw contact belongs to the user's profile are
initialized with constant values for each database.
2. Sequence numbers in the new profile database are set to a very
high value (MAX_LONG - MAX_INT) to designate an ID-space in which
profile data is stored. This is important for distinguishing
between contact and profile requests.
3. Contacts Provider URIs are divided into several sets, bucketed
automatically by a new profile-aware URI matcher.
- URIs that explicitly reference the profile.
- URIs that contain IDs (which may be in the profile ID-space).
- URIs that contain lookup keys (which may be a special profile
lookup key).
- URIs for insertion that may contain a profile ID as the parent
for the inserted record (in content values). These can't be
detected by the URI matcher by itself, so this mapping is
maintained in the provider.
By identifying whether a URI falls into one of these sets, the
contacts provider can efficiently determine whether the request
is intended for the profile database or contacts database.
4. The Contacts Provider holds onto two separate copies of the
following, one each for contacts and profiles:
- Database helper
- Transaction context
- Aggregator
- Photo store (the profile one uses a separate directory)
5. During any query/update/insert/delete/openAssetFile operation,
the URI (and content values, if applicable) are examined to
determine whether the operation is intended for the Contacts DB
or the profile DB. If intended for the profile DB, the provider
is switched (in a thread-local manner) to a profile mode, and the
operation is handed off to the profile provider. The profile
provider does a permission check, substitutes the profile database
as the active DB in the contacts provider, and continues the
operation in the Contacts Provider by calling the in-transaction
or local version of the operation, which does its normal
processing, but with everything pointing at profile-specific
databases, aggregators, etc.
6. If the operation isn't determined to be targeted to the profile
database, the provider is similarly switched (thread-locally) into
contacts mode, and the active DB is set to the contacts DB.
7. For batch operations, we only create a transaction for the
contacts DB initially. If any of the operations in the batch end
up targeting the profile DB, we start a transaction for the
profile DB. When the batch is finished, we check for that and
also commit the profile transaction if there were no errors.

Bug 5204577
Bug 5161066
Bug 5155743
Bug 5087853
Bug 5031883
Bug 5198777
Bug 5230140

Change-Id: Ic43a6625cbb6edf52ea076b084647fb0656e28e5
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
ed6bfd922fd84db21de08c1d12e93c501b86560d 11-Jul-2011 Daniel Lehmann <lehmannd@google.com> Remove restricted white-listing

Bug:4974334
Change-Id: I4dd95089774373d2b67d7e14dc6b7fc40a92d094
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
89f718673f71c71951ded3723b35a0c82d8dda34 01-Jul-2011 Mark Brophy <mbrophy@google.com> Set the new last-access time global search column.

QSB will sort results by last-access time. Set the new column
with this information for QSB.

Change-Id: Ie8871aeec4ed2a30a672bc6c064a9a32c82d2372
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
5bd028407806015c91d863ee2bbffbaaf1c200d8 06-May-2011 Dave Santoro <dsantoro@google.com> Fix search support tests.

Bug: 4382711

Change-Id: I48faaadeafa4e265fc8d72382a0e91b071b9215e
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
25110bb5ff8463a3047c29f535618a682d7cbfb6 03-May-2011 Mathew Inwood <mathewi@google.com> Handle zero-query case for global search.

When a request for no query is received, return recently contacted
contects. This is used to show recently contacted contacts in QSB
when it is first launched.

Bug: 4306122
Change-Id: Ic7b492c400d80be9661afc32a539c9317d7f73ef
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
3716f1447ceb21180d1301790eabd8b9453f486d 27-Apr-2011 Dave Santoro <dsantoro@google.com> Move snippet logic from DB to a cursor wrapper.

This results in a huge performance boost when doing searches and filters across
large Contacts DBs, since the expensive snippet() function (and associated
joins necessary for its logic) no longer need to be run for each record
returned; instead, the snippetization is only done as each entry is retrieved
from the cursor.

If the query string entered by the user consists of multiple tokens, the DB
snippet() function will still be used.

Bug: 4021462

Change-Id: I60ce69b4506bc7f770f139c127f859689b05f2d3
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
92ddc5cdc4d89ee2c6e861ae7b3a3a913ffa0100 12-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: Asian language support

Bug: 2078420
Change-Id: I1a99ad05bb6e30b539134d60f669134b87dbf180
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
174f7d319b987aa2aeeb6f2563f4b939acb8d791 11-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: QSB support

Bug: 2078420
Change-Id: I767ccecc856c0ae9ad74aafb3dac0de39b657e3c
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
9a6be1610fdf40c2f7f04cfe4b66fde3a35940dc 20-Jan-2011 Dmitri Plotnikov <dplotnikov@google.com> Making QSB query not return "Dial 777" when on a no-telephony device

Also, adding support for QSB search by phone number and
email address.

Bug: 3349545
Change-Id: Ib30cc05f1894a0a74c5dcd349affb367d82603fd
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
4cb5cd47d9c3378e22050011152c88f2bc666514 02-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Upgrading QSB Contacts query

Bug: 3125118
Change-Id: I3ed594d49647e01167f2db86d5ef07b206d85cfb
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
4394086494fe7909aaca70f56fb4bb08beebf303 19-May-2010 Dmitri Plotnikov <dplotnikov@google.com> Changing the db structure to keep visible contact ids in a separate table.

Change-Id: Ic5a5c671cae7b893c87112b9c014e2797d60d8a3
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
bc4f473094597b9c40c7c99ea8c9fdf74187eca8 02-Feb-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing ClassCastException in contact search.

Bug: 2410640
Change-Id: I1c07f24381da292478dd013d1e4536dbf45d65a0
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
2d2ec88b7af615b2f05e987da45425be9cace1ba 23-Dec-2009 Tom O'Neill <tomo@google.com> Contacts provider uses LOOKUP_KEY for search result IDs

The lookup key is more stable against merges, etc. than the contact ID,
so we are switching to that for the ID values used in search results.

Bug: 2294798
Change-Id: I09e03212828ec473b69968eb00d490785e15edbe
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
28caf262cf4f5724ff372a1d97f5130299e3a368 21-Dec-2009 Tom Taylor <tomtaylor@google.com> Update imports to android-common

Several files were moved to android-common. Update all the references
to import those files from the new location.
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
7318f9e11bdac5ea1ff5e6a8143b90c4e5c497f6 03-Dec-2009 Dmitri Plotnikov <dplotnikov@google.com> Removing unnecessary limit on name lookups in global search support for contacts

Having a limit on the number of name lookups was a bad idea
to begin with: you may be looking for one visible contact and
name lookup would yield 500 matches of which 499 are invisible,
so you would consistenly miss the one contact you were looking
for.

I have confirmed that removing this limit does not affect
the performance of the query too severely. With a set of 5000
contacts all starting with the letter "D" I still got the
one contact I was looking for in less than a second on Sholes.


See bug http://b/2298674

Change-Id: Id4219dea1be2f9ac885ef5ddda5e8376c3e050ee
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
fada1f08e7ffc8012bf2175f61f3ef3270eba9ec 02-Dec-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding a new column to Contacts: NAME_RAW_CONTACT_ID

This is in preparation for fixing bugs:
http://b/2075641
http://b/2021660
http://b/2164422
http://b/2267198
and merge with eclair-china CLs having to do with sorting using pinyin names.

Change-Id: Ifa5b442e9230a8f4fe07334c394a775f18c09218
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
dc947a9d03279eab0fb7c3b9d8ffbb492c1e2062 25-Nov-2009 Dmitri Plotnikov <dplotnikov@google.com> Optimizing global search for contacts.

Enabling some indexes, disabling some other indexes creates
the effect of a nice optimizations.

Bug: http://b/2139526
Change-Id: Icaed50ed35310d104dbba338daf757395b3792d1
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
c9bcbd7f788d71c14076d1c2fb8e8d4ad359a261 01-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2139526] Prioritizing phone number over email address in contacts search suggestions

Change-Id: I3799b81fde799b18c4e431f1662f1f5d47fe0308
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
b38ed2c5ffeb20efc677b4a9229db4a00603aa8d 29-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Renaming OpenHelper to ContactsDatabaseHelper

Change-Id: Iccdf1ebcd8a3ab430941c957f712bb9e7dd2706c
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
82bd858c9911dfbd8dca52dc276333768b0a429e 28-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding columns to support attribution of status updates. Also renaming some columns to better describe their purpose.

Change-Id: I2018079e540dedb2be1b61671742bbe99e92619c
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
f23764675b35b5262a39c79aad8e9842460274b2 21-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> No longer relying on the components of structured name for aggregation.

Now parsing display name into tokens and allowing permutations of those.

Bug IDs: 2132657, 2132636, 2089893

Change-Id: Idea256bbec3b82fb229199c6bd6e9d7b145ab075
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
b3f909fee75cb384fc381ec5ce70dd001669f945 24-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Support for Global Search Shortcut refresh and contact images.
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
00ec508630251d6c6e3746469c9428f5a8cd5996 05-Aug-2009 Jeff Sharkey <jsharkey@android.com> Fix column map naming, empty projection behavior.

The "MAX(mode)" projection needed to be named as the
expected column to be useful. The default behavior of
assertContained when asking for no specific columns
(projection=null) should be to /not/ limit to just that
single column. And finally, fix up one place where the
protection clause was being appended wrong.
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java
a908fb5f39aa2021662a6cc317cc7e4db2d8bfb0 04-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Breaking global search support into a separate class and limiting search results to visible contacts only.
/packages/providers/ContactsProvider/src/com/android/providers/contacts/GlobalSearchSupport.java