OSDN Git Service

store contact id in messages table instead of the contact name string; merge messages...
authorWei Huang <weih@google.com>
Tue, 28 Apr 2009 00:07:54 +0000 (17:07 -0700)
committerWei Huang <weih@google.com>
Wed, 29 Apr 2009 21:27:24 +0000 (14:27 -0700)
commit87218e13a6927d48cc43e7b35c1ccc3e8017069c
tree5a52bb93d7bcae0d3f044c01a4ad32f28b67efa6
parent3b75fbace07685d92f184d990961dedbfa3496f0
store contact id in messages table instead of the contact name string; merge messages and group messages table.

- merge group messages table with the messages table.
- replace the columns 'provider', 'account', 'contact' with 'thread_id' column in the messages table. The thread_id
  column really contains the contact id for both messages and group messages.
- when querying for messages, use joined table b/t messages and contacts, so we can get the contact name with
  the query. This is really for finding messages given a contact name, with the selection equal to
  "contacts.account=? AND contacts.USERNAME=?".
- added uri "content://im/messagesByThreadId", "content://im/messagesByProvider", etc.
- reinstated the contact cleanup triggers to remove chats and messages. This was taken out because GTalkService
  wipes out the old contacts and re-insert new roster result, causing the onging chats to be deleted. I changed
  the way GTalkService updates contacts when getting a roster result on reconnect, and it's no longer destructive.
src/com/android/providers/im/ImProvider.java