History log of /packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
400e50c1efeb601f6162bd829fdf33e9dc5252f6 13-May-2015 Makoto Onuki <omakoto@google.com> Clean up permissions

- All permission checks now always pass if the caller is self.
- Remove uses-permissions that're enforced by self.

Bug 20927020

Change-Id: I985338495ed947d317f37e1a8d674a40c5e6bfe4
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
77b65aa3d1c2db02ce664c4b31e10370efe645cb 23-Apr-2015 Yorke Lee <yorkelee@google.com> Grant VoicemailContentProvider permissions to default or system dialers

Bug: 20333102
Change-Id: Icb54620cf9241b3999bcb3de1b73394c71becb2f
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
33c4eba05b46e112f7de966d63a0459d75b33970 17-Apr-2015 Svet Ganov <svetoslavganov@google.com> Add OP_ADD_VOICEMAIL app op - contacts provider

Change-Id: I0dfce97bd1dc3df9118c3a3e7ec5f00c764abbb1
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
2ad39edbd856f3ea1177788aff7e653e593781eb 19-Jul-2014 Yorke Lee <yorkelee@google.com> Rename voicemail permissions

Rename READ_ALL_VOICEMAIL to READ_VOICEMAIL, and MANAGE_VOICEMAIL
to WRITE_VOICEMAIL
Bug: 16400686

Change-Id: I45d841b886c2bbe230c2f13fddbce41a729b6c61
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
ab2ec1d4316770e2ce8dc47dd1ae71430cd70e36 25-Jun-2014 Yorke Lee <yorkelee@google.com> Add manage voicemail permission (2/4)

Update CallLogProvider and VoicemailProvider to provide read/write access to
voicemails based on their respective permissions.

Also update tests to reflect the new world.

Bug: 6948882

Change-Id: I26e960eae24dc1b8bd4a372420d4c42f242c88d3
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
3ccaf5590a7ed2fca780f9b7fc46328d0f78a2ee 17-Jun-2014 fafaisland <fafaisland@google.com> Add READ_ALL_VOICEMAILS Permision to VoicemailPermissions, VoicemailContentProvider
and CallLogProvider

Bug:15695227

Change-Id: I244541c847c07450535a52d0bf38199b55387202
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
66d989c439fbb82a5b40a7efffa2f28208cf11d8 06-Sep-2013 Jeff Sharkey <jsharkey@android.com> Rename getCallingPackage() to avoid clash.

The framework now offers an authoritative getCallingPackage().

Bug: 10626527
Change-Id: I845ce60a092d944ea0351f10ee41dbf07b8dfecd
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.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/VoicemailContentProvider.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/VoicemailContentProvider.java
c4144727cd740079f47e74ae5078d1613874f72a 29-Aug-2011 Makoto Onuki <omakoto@google.com> Lazily-initialize PhoneNumberOfflineGeocoder/PhoneNumberUtil

- They were indirectly created in VoicemailContentProvider.onCreate and
CallLogProvider.onCreate, and were slow. It was taking ~300ms on my
measurement on a nexus-s. Also it touched the filesystem, so it can
be much slower on worn-out flash or when flash is busy.

- Doing it in a provider's onCreate means it affects auto-complete
performance if acore is not started. Also it'll affect app-startup
when we merge processes.

- But they were actually only used when inserting a call log, so we don't
have to initialize them at startup.

- Inserting a call-log should be done in a worker thread, so lazy-
initialization shouldn't cause laggy UI.

(Alternatively, we could initialize them in a worker thread at startup,
but I don't think it's worth it.)

- Also, now CallLogProvider and VoicemailContentProvider share the
same instance of DefaultCallLogInsertionHelper.
(They used to have their own)
same instance of DefaultCallLogInsertionHelper doesn't have any
instance specific state, so this should be safe.

Bug 5220669

Change-Id: Ibcd664ed683507c5dcac88bec736e4903a4a7032
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
663b8b8ce7a29fb2796dc6431f2cd5992934f315 28-Aug-2011 Makoto Onuki <omakoto@google.com> Add log to measure startup performance

Use this to enable log:

adb shell setprop log.tag.ContactsPerf VERBOSE

Bug 5195464

Change-Id: I8348dffb050c562e708ab81405d556625794fdf3
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.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/VoicemailContentProvider.java
eeffa7edb048e785ebc665c830dc84d87f174b07 04-Aug-2011 Debashish Chatterjee <debashishc@google.com> Allow read-only sharing of Uri in voicemail content provider.

Since we perform our own permission check, uri permission check
done by the content resolver is not sufficient. Our implementation of
the content provider should also explicitly check for uri level permission.

This is needed to allow sharing of voicemail uri from the contacts app.

In a follow up change we will allow sharing of URIs only to those apps that has
ALL permission. Right now the provider definition does not allow sharing
of uri.

Bug: 4961053
Change-Id: I5af53ee76ea10fa5f45c8cdcb95c773cc7ad138e
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
98a77ec8057c5fe0ff487ca7d0910312693e5689 03-Aug-2011 Debashish Chatterjee <debashishc@google.com> Renamed permission READ_WRITE_OWN_VOICEMAIL to ADD_VOICEMAIL

The framework changes to add new permission ADD_VOICEMAIL went in
change-Id: I515e7967bdb0e8498a60a32983f9122ce10dcc4a.
And the contacts app to start using the new permission went in
change-id: I188a109b69228e58a2c9b1d9a234a270df60555a

Bug: 5098551
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.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/VoicemailContentProvider.java
791a25b9f228bed8d8bb2febadbd883452555d89 20-Jul-2011 Debashish Chatterjee <debashishc@google.com> Get rid of voicemail permissions from contacts content provider.

They are now defined in framework/base. submitted in
https://android-git.corp.google.com/g/119573

Bug: 5049309
Change-Id: I9927efe575b3a8b098599154c213840564023dfd
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
1fafab3782590ab080dab07651df5aed0768e154 20-Jul-2011 Debashish Chatterjee <debashishc@google.com> Include EXTRA_SELF_CHANGE only for PROVIDER_CHANGED event.

Voicemail content provider should include the extra EXTRA_SELF_CHANGED
only for the PROVIDER_CHANGED and not for NEW_VOICEMAIL event.

Bug: 5052915
Change-Id: Idd976ced2a3eaed878847e43488eb5202b677338
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.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/VoicemailContentProvider.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/VoicemailContentProvider.java
6fbb4b739c288395bd80343400d3455b0292a0fd 04-Jul-2011 Debashish Chatterjee <debashishc@google.com> Stop using deprecated field VoicemailContract.CONTENT_URI.

Instead use VoicemailContract.Voicemail.CONTENT_URI.

Change-Id: I2a5b8afd15d472ace254de429f37d1ae51e372cd
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
e36e13b9e92759bb861a10ff22195853359c267d 04-Jul-2011 Debashish Chatterjee <debashishc@google.com> Modified voicemail provider to accept source_package as a param.

Voicemail provider now no more supports /source/ path. Also stopped
using deprecated fields of VoicemailContract.

Change-Id: Ieab08781bca6ec571f29c56ca55d84a8fd18547b
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
06f995b614e0ebe59ff75f170e20ca96c9b17f0c 01-Jul-2011 Debashish Chatterjee <debashishc@google.com> Send broadcast intents to specific component instead of package.

This avoids sending duplicate notification to the same package if it has
more than components registered for the same broadcast.

Change-Id: I93744aebc9a4800c5ce1fd60fb1468382f55934e
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
975d52af754e6f05089fcd9f7066df05c290c3b7 01-Jul-2011 Debashish Chatterjee <debashishc@google.com> Fixed VoicemailProviderTest.

A recent change in voicemail content provider used the package manager
queryBroadcastReceivers() to query the receiving packages of the broadcast intent.
However, mock package manager used in the test env does not support this
operation and throws an exception.
The fix is to wrap this method within the content provider
implementation and stub the wrapper method in the test.

Change-Id: Ief4887f1379614466ea6471cf7b132ef873550ba
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
42e8dddb940a502e97151a08f16b87aed7b30de5 27-Jun-2011 Debashish Chatterjee <debashishc@google.com> Modified VoicemailContentProvider to set 'SELF_CHANGE' in notifications.

VoicemailContentProvider now sets the new boolean extra 'SELF_CHANGE'
instead of 'CHANGED_BY' in its broadcast intents. This is more secure as
we do not reveal the details of the application that caused the change.

see bug https://b/4773134

Change-Id: I9ff1c782d9924da628b00cd9e712ab3dba9ab9d2
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
aafbe295d67686870c64c74a59e589d1dfb506fa 20-Jun-2011 Debashish Chatterjee <debashishc@google.com> Introduced query param 'include_voicemails' for call_log uri.

- by default only call entries (i.e. no voicemails) are returned.
- if include_voicemails is set to true then also include voicemail
records, but only if the caller has full voicemail permission.
- voicemail record can only be inserted through call_log provider if
include_voicemails is set.

Change-Id: I98f6778ace64fa752dc0525c5ce4e5eb83b2e689
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
00e7c94b70f4b477653534dbe559d1759d796157 16-Jun-2011 Debashish Chatterjee <debashishc@google.com> Added checks in voicemail provider to not expose call_log fields.

- Voicemail provider now has check to ensure that no field outside of its
projection is accesible.
- Moved functionality to check ContentValues against a projection map to
DbQueryUtils.
- Associated test cases.

Change-Id: I23033c96f74f0ab981152f70e585c69ba5284602
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
1975b56a3368b4b7684429ffa79e7b9dbc35b475 16-Jun-2011 Debashish Chatterjee <debashishc@google.com> Unit tests for voicemail provider.

These tests cover basic functionality of the provider including
permission checks and media content input/output.

The key functionality that is yet to be tested is provider
change broadcast intents. This requires us to use a mocking framework,
and we are yet to finalize on which one we will use.

Change-Id: I2304309c4fc109cc1e0b969ede33d8268a4d4194
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java
52e8d24f8492116f0b49b147576ce13a5f913aa2 13-Jun-2011 Debashish Chatterjee <debashishc@google.com> Voicemail provider implementation within ContactsProvider.

- New voicemail provider class
- all voicemail operations restricted to only 'voicemail' call type.
- new voicemail permissions (currently defined in the manifest file
itself)

Change-Id: I32b916c5b4a53e93bafbecf7df7bee3f5e27fee6
/packages/providers/ContactsProvider/src/com/android/providers/contacts/VoicemailContentProvider.java