I have been rooting around in the framework on ICS, and it appears that the ContactsProvider2, in the Android Contacts Provider, calls notifyChange after any insert/update, not only that, it does it by:
NotifyChange(ContactsContract.AUTHORITY_URI, null, syncToNetwork);
That means that ANY insert/update/delete on the contacts AUTHORITY Uri triggers content observers to get an update. While in theory, this is pretty good.. It appears that it also gets triggered by way of Presence updates.
If I try to pull a cursor on the Data table, it too links the data table to presence, and any updates to presence have onLoadFinished to get called (CursorLoader).
Looking into the cursor issue, it looks like it is because the ContactsProvider2 calls
setTablesAndProjectionMapForData()
which in turn appends Presnce/status columns to every data row.
appendContactPresenceJoin(sb, projection, RawContacts.CONTACT_ID);
appendContactStatusUpdateJoin(sb, projection, ContactsColumns.LAST_STATUS_UPDATE_ID);
appendDataPresenceJoin(sb, projection, DataColumns.CONCRETE_ID);
appendDataStatusUpdateJoin(sb, projection, DataColumns.CONCRETE_ID);
Is there any way to register a content Observer to get updates on the Data table changing w/out actually getting updates for Presence changes? I believe presence used to be excluded from Data.CONTENT_URI queries in 2.3 / 3.x.. But looks like it has changed..