summaryrefslogtreecommitdiffstats
path: root/src/com/android/providers/contacts/DatabaseModifier.java
Commit message (Collapse)AuthorAgeFilesLines
* Improvements in voicemail broadcast notifications.Debashish Chatterjee2011-07-261-0/+51
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