OSDN Git Service

[ContactsContract] Add new API PhoneLookup.CONTACT_ID and DATA_ID
authorTony Mak <tonymak@google.com>
Wed, 17 Feb 2016 14:11:52 +0000 (14:11 +0000)
committerTony Mak <tonymak@google.com>
Wed, 17 Feb 2016 21:08:09 +0000 (21:08 +0000)
commitfd9ec5a6006868905a2a0d97b74c9a2786907536
treeee09c3551a963e9c9161b5152a2630432fc7e436
parent5a21f2dd4b2d12afe19bf973015d33a5c9c5e0c6
[ContactsContract] Add new API PhoneLookup.CONTACT_ID and DATA_ID

It is a mistake that we put contact id in PhoneLookup._ID.
But for SIP query, the contact id is put in Data.CONTACT_ID instead.
For backward-compability issue, we can't revert the change, but to
save developer from having logic like below, PhoneLookup.CONTACT_ID is
introduced.

if (sip) {
    get contact id in Data.CONTACT_ID column
} else {
    get contact id in PhoneLookup._ID column
}

So for sip query, we put contact id in PhoneLookup.CONTACT_ID.
For other phone lookup query, we put contact id in both PhoneLookup.ID
and PhoneLookup.CONTACT_ID.

BUG:27149017

Change-Id: I4155da29bbacdda0d43164b0ce11c7224a4eee67
api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/provider/ContactsContract.java