History log of /packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c40e89125712d307f8cc0cc58d0227e96c251e23 23-Jul-2013 Chiao Cheng <chiaocheng@google.com> am 84acbc81: am e2688b18: am 44c3d51b: am 13d744f2: am 466d8411: am 8d54a6e0: resolved conflicts for merge of b8fb609b to jb-mr1-dev

* commit '84acbc81b50e8d30df668b4ffd763b7c96e172a2':
Do not allow updates to the _data column.
8d54a6e0fa9fb4bb0a2b3b2f36d0e9bf930d05c8 23-Jul-2013 Chiao Cheng <chiaocheng@google.com> resolved conflicts for merge of b8fb609b to jb-mr1-dev

Change-Id: I336ee0b3f041f83a4b4e2c9973abb73852c2cc6f
284f71646d1953f2d78b53e2cdb42cb93e1d9d6f 11-Jul-2013 Chiao Cheng <chiaocheng@google.com> Do not allow updates to the _data column.

Fixes a security hole where applications can update the data location of
voicemail files to point to arbitrary file paths.

Voicemail provider stores the location of the data file in the _data column.
Applications can update this with an arbitrary file path as long as they
have the ADD_VOICEMAIL permission. Then they can subsequently read that
voicemail and obtain access to the file. This location is generated by the
provider and does not need to be updated by the applications.

Bug: 9674953
(cherry picked from commit ab2a24c126f35ae4aefb469f91094e5972abd8f0)

Change-Id: I6c795fe8e283f60f71ebc0e53606383c9fd22e71
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
ab2a24c126f35ae4aefb469f91094e5972abd8f0 11-Jul-2013 Chiao Cheng <chiaocheng@google.com> Do not allow updates to the _data column.

Fixes a security hole where applications can update the data location of
voicemail files to point to arbitrary file paths.

Voicemail provider stores the location of the data file in the _data column.
Applications can update this with an arbitrary file path as long as they
have the ADD_VOICEMAIL permission. Then they can subsequently read that
voicemail and obtain access to the file. This location is generated by the
provider and does not need to be updated by the applications.

Bug: 9674953
Change-Id: I9c8fc45071a06d627574a52bafbd9e6e172b4bf8
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
38210445730ee04c351c7cc1b3800cfe23e34325 27-Jun-2012 Makoto Onuki <omakoto@google.com> Reorganize import in contacts provider

Change-Id: If3afb134ea36bd93859efcd114885526e1592b91
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
47106a03cd4587123f4fa24f3620baf55fed15d9 13-Dec-2011 Dave Santoro <dsantoro@google.com> Moving ProjectionMap to frameworks/ex.

Change-Id: I3ccd0dd27ff0fe49ac54574449264c2e957d3a01
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
9978b26dd17bb2b20b91101f1e4682604336b5f6 15-Nov-2011 Flavio Lerda <flerda@google.com> Use integer constant when adding filtering clause.

Currently we are quoting an integer constant when generating the
filtering clause that excludes voicemails from the set of calls returned
to applications querying the default call log URI.

Pass the integer to the helper function, so that we can avoid quoting.

Change-Id: I1e460d2c8d3b04047cf4a1f4e1209b3e4ba5053b
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentTable.java
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