Correctly report unknown vCard size for OpenableColumns.

Fixes http://b/2332466
Fixing Contacts DB upgrade logic

We would try to create views and triggers before the fields they
reference got added.

Bug: 2353082

Change-Id: I90eb0559cb1a1838e4ad680e4180af57c6254797
Do not use a user tag on apps, as it is ignored.

The build system does not honor user tags on apps,
and setting it is misleading.

This removes the confusion by making the makefiles
behave like they read.

Change-Id: Ia141dc1e5a3892bb344f319fc3d573e0ce160352
Fixing upgrade logic to contacts.db v.205

The problem was caused by unsynched deleted raw contacts. These
raw contacts don't have a contact_id, which was the cause
of the exception during the upgrage.

Bug: 2338000
Change-Id: I04630bee76edc7ba70324afa88e9dcae9aa99512
android-2.1_r1 snapshot
Make PostalSplitter support Japanese name-splitting algorithm and add unit tests for them.
This change is originally from Change I8f7aaf13.

Bug: 2275764
don't set max cachesize anylonger. it is managed by SQLiteDatabase.

max cachesize is now automatically managed by SQLiteDtabase. and there
is no longer the API call used by ContactsDatabaseHelper to set the max
cachesize.
Merge "don't set max cachesize anylonger. it is managed by SQLiteDatabase."
Solving deadlock in ContactProvider2

These two threads are deadlocked.

There are two locks involved: database lock (marked with D below and
the object lock on ContactsDatabaseHelper marked with H)

"Binder Thread #2" prio=5 tid=13 MONITOR
  | group="main" sCount=1 dsCount=0 s=N obj=0x44bee478 self=0x1205f8
  | sysTid=1439 nice=0 sched=0/0 cgrp=default handle=1201736
H at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:~149)
  at com.android.providers.contacts.ContactsDatabaseHelper.getMimeTypeId(ContactsDatabaseHelper.java:1512)
  at com.android.providers.contacts.ContactsDatabaseHelper.updateAllVisible(ContactsDatabaseHelper.java:1554)
  at com.android.providers.contacts.ContactsProvider2.beforeTransactionCommit(ContactsProvider2.java:1989)
  at com.android.providers.contacts.SQLiteContentProvider.onCommit(SQLiteContentProvider.java:216)
  at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:494)
D at com.android.providers.contacts.SQLiteContentProvider.insert(SQLiteContentProvider.java:96)
  at com.android.providers.contacts.ContactsProvider2.insert(ContactsProvider2.java:1941)
  at android.content.ContentProvider$Transport.insert(ContentProvider.java:150)
  at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:140)
  at android.os.Binder.execTransact(Binder.java:287)
  at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #1" prio=5 tid=11 WAIT
  | group="main" sCount=1 dsCount=0 s=N obj=0x44bea248 self=0x125480
  | sysTid=1438 nice=0 sched=0/0 cgrp=default handle=1145184
  at java.lang.Object.wait(Native Method)
  - waiting on <0x5319d0> (a java.lang.VMThread)
  at java.lang.Thread.parkFor(Thread.java:1535)
  at java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48)
  at sun.misc.Unsafe.park(Unsafe.java:317)
  at java.util.concurrent.locks.LockSupport.park(LockSupport.java:131)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:790)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:823)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1153)
  at java.util.concurrent.locks.ReentrantLock$FairSync.lock(ReentrantLock.java:200)
  at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:261)
D at android.database.sqlite.SQLiteDatabase.lock(SQLiteDatabase.java:305)
  at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:116)
H at com.android.providers.contacts.ContactsDatabaseHelper.getCachedId(ContactsDatabaseHelper.java:1478)
  at com.android.providers.contacts.ContactsDatabaseHelper.getMimeTypeId(ContactsDatabaseHelper.java:1513)
  at com.android.providers.contacts.ContactsProvider2.query(ContactsProvider2.java:3765)
  at android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:117)
  at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:98)
  at android.os.Binder.execTransact(Binder.java:287)
  at dalvik.system.NativeStart.run(Native Method)

Removing synchronization from the getCachedId method is benign. Worst case
some value would be read from the database twice - no biggie.

Bug: 2370192
Change-Id: Ia6606d5bf617a8d52daaa1e63f57aeeba6dd0437
am f4a3b7e5: Solving deadlock in ContactProvider2

Merge commit 'f4a3b7e523e36679b68edd2af632e26648758ff2' into eclair-plus-aosp

* commit 'f4a3b7e523e36679b68edd2af632e26648758ff2':
  Solving deadlock in ContactProvider2
Support for the RawContacts.NAME_VERIFIED field.

Bug: 2164422
Change-Id: I144819b04bbdb506d9e582de490fd3aa42cb0682
am fdbc8f37: am f4a3b7e5: Solving deadlock in ContactProvider2

Merge commit 'fdbc8f3785a4c097a086b2dcfbfcb2d1188cb331'

* commit 'fdbc8f3785a4c097a086b2dcfbfcb2d1188cb331':
  Solving deadlock in ContactProvider2
Optimizing the Contacts Display Setting screen.

Summary:
Given an account with 5020 contacts,
Before this optimization it would take roughly 10sec to
change visibility of either 5000 of them or 20 of them.
After the optimization, changing visibility of 5000 contact
still takes roughly the same time, but changing visiblity
of 20 contacts takes 1.5 sec.

There is another optimization that can be done (mentioned in the
CL that reduces the cost for 5000 contacts from 10sec to
about 3.5sec.  That's a bit more involved and a TODO for later.


Change-Id: Iee8f251fdcab50a26b6b02131c0d23fb84aabd46
a. Fix the issue that the FullNameStyle is not updated when user edits the contact or the contacts being synced.
b. Add  Chinese sort and search.
c. Adds a CJK check for each contact at runtime. per discussion with component owner, will tune performance later after Korean and Japanese features are added.
reconcile android-2.1_r1 snapshot
Fixing ClassCastException in contact search.

Bug: 2410640
Change-Id: I1c07f24381da292478dd013d1e4536dbf45d65a0
reconcile main tree with open-source eclair
am a72b3934: reconcile main tree with open-source eclair

Merge commit 'a72b39349e48c24aa312c6fa7f1721563733b35d' into eclair-plus-aosp

* commit 'a72b39349e48c24aa312c6fa7f1721563733b35d':
  android-2.1_r1 snapshot
am b3c80626: am a72b3934: reconcile main tree with open-source eclair

Merge commit 'b3c80626606fd3cad8df7e34d48832bddaead8cd'

* commit 'b3c80626606fd3cad8df7e34d48832bddaead8cd':
  android-2.1_r1 snapshot
Fixing contact lookup by company name and title

Bug: 1360100
Change-Id: Ic897ee1cb9e1c11c858b85b4c0c1d364fabccaad