History log of /packages/providers/ContactsProvider/src/com/android/providers/contacts/DatabaseModifier.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
929a04e2830e30718930d96335dfb0a729b6ab91 23-Jul-2011 Debashish Chatterjee <debashishc@google.com> Improvements in voicemail broadcast notifications.

This change fixes two primary issues:
1) If a voicemail record is modified through call log provider, a
voicemail provider notification is now generated.
2) voicemail notifications are now sent with permission ALL if the
receiving component packages is not the owner of the modified record.
This ensures that a voicemail source (having OWN permission) gets notified
only of changes for records that it owns. But a package that has ALL
permissions get notified of everything,

A new interface DatabaseModifier is now used by both voicemail as well as
calllog provider to perform any operations that can modify the
underlying table. DbModifierWithVmNotification implementation of this
interface fires relevant notifications under the hoods.
All logic related to sending notifications is now moved from
VoicemailContentProvider to this new class.

bulkInsert has no special treatment anymore. We now fall back to the framework's
default implementation. It was complicated to optimize for provider_changed events
for bulk insert when using the DatabaseModifier interface.

TODO: I am yet to write unit tests for broadcast intents. I have done
manual testing to make sure that they work. Also the existing unit tests pass,
proving that none of the existing content provider operations are broken by
using the DatabaseModifier wrapper.

Bug: 5060354
Bug: 4974222

Change-Id: I0935105f146a71abeffbde634d79f8806b8e0ed2
/packages/providers/ContactsProvider/src/com/android/providers/contacts/DatabaseModifier.java