History log of /packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/MockPackageManager.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
46c450d29bc7e2cdce7241ac735d6562785d8384 29-Jul-2011 Debashish Chatterjee <debashishc@google.com> Fix VoicemailProviderTest.

Modified MockPackageManager to stub checkPermissions. This method was
recently used in production code in
Change-Id: I20982572d7f9a08ce98b03b23c9d2d8aa60efc9f

but I missed to update the Mock. Consequently the tests now fail with
unsupportedoperation exception.
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/MockPackageManager.java
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/tests/src/com/android/providers/contacts/MockPackageManager.java