History log of /packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f402aaf776fee29d8044d97979b16695f24086dd 05-Sep-2011 Flavio Lerda <flerda@google.com> Fix voicemail tests.

The problem is that we run this query locally (within the same process)
in the tests and this means that the content values passed in were
modified and later re-used (assuming it would not contain the extra,
generated columns). The solution is to always make a copy of the content
values before modifying them in the provider (which is the safest way
anyway).

Bug: 5226211
Change-Id: I972111821a4af1e1d3df2dc47189d664a7303683
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
3ae32e20bc3f7a278471475efa300b6544b1112e 11-Aug-2011 Debashish Chatterjee <debashishc@google.com> Voicemail provider: Don't automatically set HAS_CONTENT field.

It is best to let the content owner set this field when it is finished
writing the content into the file.

Another change will modify the voicemailproviderdemo app to set this
field in the app.

Bug: 5147190
Change-Id: I93e4b467acdefe339fa70dd751ea05f195c32e71
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
2e757d904e62dbf5bc0b028626fa9319ccc38c45 09-Aug-2011 Debashish Chatterjee <debashishc@google.com> Notify callog uri if a change is made through voicemail provider.

DbModifierWithVmNotification till now only notified to voicemail uri
content observers for change made through call log provider. We need the
otherway round as well so that any change made to a voicemail entry
through the voicemail provider should be notified to listeners of
calllog uri. This is needed to make call log auto refresh work when a new
voicemail is inserted.

DbModifierWithVmNotification is now renamed to DbModifierWithNotification
and suports both ways notification. Notifications generated by call log
provider as well is now routed through this class.

Bug: 5055868
Change-Id: I2de8c9867445bcb86ce94a8600acc726266c8008
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
aeaba441ddb05dede8bd86291ca78f42d670d54c 09-Aug-2011 Flavio Lerda <flerda@google.com> Automatically add a geocoded location to entries in the call log.

This change adds a geocoded location value to entries added to the call
log.

One limitation is that this is unaware of changes to the locale. We
needed to decide whether this is fine or if we should update the stored
geocode on locale changes.

Bug: 5129581
Change-Id: I2ad1b3fbd24491df2febf3e1fd615c16dd74398f
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
eaa7d851000e368a18be24bc816046ad9cf49d6e 08-Aug-2011 Debashish Chatterjee <debashishc@google.com> Modified VoicemailContentProvider to set Calls.NEW

Calls.NEW is now an internal field for the voicemail interface and so
the content provider must set it to '1' for new voicemail insertions.
Contacts app now depends on this field to show notifications.

Bug: 5055868

Change-Id: Ic76501fa3a4361f1fce278247295d0bbe2f1f4c8
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
1c8e5fcdd6199f5959aaa6eab47e806b401efdd9 04-Aug-2011 Hugo Hudson <hugohudson@google.com> Don't crash deleting a voiceamil with no file.

- The file constructor wasn't happy with null.
- Instead log a warning and carry on.

Bug: 5120418
Change-Id: I6d83c34dbea828b560674c065b45a1eb04b07ee6
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
1e6310fcc55c8549c98018fc427b54e1619320a4 30-Jul-2011 Hugo Hudson <hugohudson@google.com> Add synthetic columns to voicemail table.

- Since our voicemail table supports getInputStream and getOutputStream
we should also support the columns for DISPLAY_NAME and SIZE, since
these are expected to exist for helping other apps share files -
attaching to an email in GMail for example.
- Uses an SQL hack to combine a suitably localized string with the
number column for the display name.

Bug: 5066115
Change-Id: I48a08ade2a3a2a28a1d3e3415ec27dd956056d44
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
d558ccc921460ac382850a8e6e2e668f3a2b9b26 29-Jul-2011 Debashish Chatterjee <debashishc@google.com> No more use audio mime type for voicemail uris.

This makes the uri handling simpler, as we voicemail uris can now only
be of item or dir and does not depend on the content.

This also avoids strict mode violation when getType is called from UI
thread.

There is no change needed in the contacts app because the URI mime type
is right now used by the app.

Bug: 5090052
Change-Id: Ie2e502f9b09465dc343e873d43e206aaad8b6076
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
51d1da962292ecef21abdf7e41abfdb7f1d72fcd 27-Jul-2011 Debashish Chatterjee <debashishc@google.com> Merge "Improvements in voicemail broadcast notifications."
94cc8c65bc46f60b912091d3037376e15b74da0f 26-Jul-2011 Flavio Lerda <flerda@google.com> Do not expose the NEW column in the Voicemail provider.

We added the IS_READ column, so that we can distinguish between items
that are new and items that have not been read (or heard, for
voicemail).

However, there is no reason to expose the NEW status of voicemail, since
that is about whether the user should be notified and it is handled
entirely by the content provider and Contacts application.

This is part of the changes needed to fix notifications for voicemails.

Bug: 5036195
Change-Id: I74d760a73d5ffbbb6eb26f2dbe7c7ca2a92ad2d6
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.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/src/com/android/providers/contacts/VoicemailContentTable.java
b2197b235e3d96e7f70c24d548b7dac52dab88d8 21-Jul-2011 Flavio Lerda <flerda@google.com> Implement IS_READ column in content providers.

Add support for the IS_READ column in the call log and voicemail content
providers. This columns will be used to store whether a call log entry
(currently only voicemail) has been read or otherwise consumed by the
user.

Bug: 5036195
Change-Id: I06840f9820f7d568a738c0307f4294c2b8c66031
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
9cf06e7bcb0be759f1c930412fd2e41eba4f5f03 06-Jul-2011 Debashish Chatterjee <debashishc@google.com> VoicemailStatus content provider implementation.

- New Voicemail.Delegate implementation for voicemail_status table.
- modified openFile() interface to simplify the interaction.
- UridData now has a getWhereClause() method that can be used by both
the tables to set selection clause based on the uriData.
- Imrpoved permission checks for ContentValues for
update/insert/bulkinsert operations.

Bug:4968719

Change-Id: I6a6173c58d9929ef952c7d7e95afb8bc5ff4157b
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
4b571ba0de4fac4ff9d2a4277032b8c6548fdbfa 05-Jul-2011 Debashish Chatterjee <debashishc@google.com> Refactored VoicemailContentProvider to simplify using multiple tables.

This is needed to simplify the voicemail provider to be able to serve
operations on the voicemail_status table as well.

The idea is to retain all common functionality related to voicemail
permission check etc in the main VoicemailContentProvider class. And
delegate database level operations to another class that only deals with
functionality speficic to the underlying table.

In the favor of code reuse the interaction between voicemail_content_provider
and voicemail_table_implementations is both ways. VoicemailTable
interface defines the operations exposed by both sides.

I have also added a couple of new test cases to cover getType() and
source_package check in the uri. Old test cases continue to pass to
prove that the refactoring did not break any functionality.

Change-Id: I4cb031234c2f5746084c51557e2ba0edbaf3d6de
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java