History log of /frameworks/base/core/java/android/content/ContentService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6ab72d74b86e5f4ec3c3909366fd46c225a66bd7 09-Oct-2012 Jeff Sharkey <jsharkey@android.com> Make RegisteredServicesCache multi-user aware.

RegisteredServicesCache is used to track account authenticators and
sync adapters, which can vary based on user. This change requires
that callers now provide a userId when making cache requests. It
continues persisting into a single file for now, which is keyed based
on UID.

It now watches for package broadcasts from all users, and scans
packages on-demand. It changes cache callers to provide a relevant
userId, and evicts cache entries when users are stopped.

Changes SyncManager to only work with accounts from running users,
only kicking off pending syncs once a user is started.

Bug: 7276595, 7316150
Change-Id: I79466a84aa69aa37e4bd9691c5d6221d3662ff29
/frameworks/base/core/java/android/content/ContentService.java
b7564454297ba1706670ccab0562cac6676d0a77 20-Sep-2012 Christopher Tate <ctate@google.com> Multiuser awareness in content observer infrastructure

Content observers are registered under the calling user's identity,
not under the provider host's identity (unless the caller is using
the new permissioned entry points that allow observers to be
registered for a different user's view of the data). The most important
implication of this is that when the settings provider is directly
queried, the Cursor returned to the app is wired for change notifications
based on that calling app's user.

Note that it is not possible to use query() / insert() to read/write
data for different users. All such manipulations should use the
standard get* / put* methods in Settings.*.

Bug 7122169

Change-Id: If5d9ec44927e5e56e4e7635438f4ef48a5430986
/frameworks/base/core/java/android/content/ContentService.java
e6c660ab35d60952e38e74b60c34db57ef00b674 19-Sep-2012 Christopher Tate <ctate@google.com> Disable content observer cross-user permission checks...

... until we have a solid fix for the singleton ContentProvider
problem cases in place.

Bug 7190837

Change-Id: Ibbef2ddc594896ba7b9217e2856c3e393f525af6
/frameworks/base/core/java/android/content/ContentService.java
16aa9736175f5bbe924a6e5587a2ca47c2dd702b 18-Sep-2012 Christopher Tate <ctate@google.com> Per-user content observer APIs

Callers with INTERACT_ACROSS_USERS_FULL permission can now observe content
for a given user's view (and can notify content uri changes targeted to a
specific user). An observer watching for UserHandle.USER_ALL will see all
notifications for the given uri across all users; similarly, a notifier
who specifies USER_ALL will broadcast the change to all observers across
all users.

The API handles both USER_ALL or USER_CURRENT, and explicitly forbids
any other "pseudouser" designations.

This CL also revs the Settings provider to notify with USER_ALL for
changes to global settings, and with only the affected user's handle
for all other changes.

Bug 7122169

Change-Id: I94248b11aa91d1beb0a36432e82fe5725bb1264f
/frameworks/base/core/java/android/content/ContentService.java
f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 16-Aug-2012 Dianne Hackborn <hackbod@google.com> Rename UserId to UserHandle.

This is the start of turning this into a formal public API.

Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
/frameworks/base/core/java/android/content/ContentService.java
26ff6626fc4ee0ae46f01ad309b366921da589fe 30-Jul-2012 Kenny Root <kroot@google.com> Delay AccountManagerService initialization

Since applications can have Account providers, they need to be delayed
until after PackageManagerService says everything is mounted.
Otherwise the accounts associated with that provider will be removed
immediately when startup happens.

Bug: 6820670
Change-Id: Iba81765260421649f706624d0605a40ebc1347b1
/frameworks/base/core/java/android/content/ContentService.java
04e0d265e3385e9d1fbc35e43c4e8caffbbe3290 14-Feb-2012 Amith Yamasani <yamasani@google.com> Make SyncManager and AccountManagerService multi-user aware.

AccountManagerService
- Maintain multiple account lists, one per user
- Keep multiple databases of accounts
- Account db moved to /data/system/users/<userid>/

SyncManager
- SyncStorageEngine keeps track of multiple users' accounts.
- SyncQueue maintained as a single instance, queueing requests from
multiple users.
- Changed some methods to take userId arguments
- Removed some deadc0de
- Store the userId in the SyncOperation, so we know which provider
instance to bind to when queued operations are processed.

ContentService
- Pass along the userid to sync manager calls.

ActivityManagerService:
- Fixed a bug in cancelIntentSender
- Don't bring other user's task forward when resetting tasks.

Updated tests

Change-Id: If317340ef68e902787aa3f5ceb4cf96f14aea695
/frameworks/base/core/java/android/content/ContentService.java
655e66bceba7595a2b80e7a328433e6ed5dc28a9 24-Jan-2012 Jeff Brown <jeffbrown@google.com> Inform ContentObservers about the changed content Uri.

Added a new method ContentObserver.onChange(boolean, Uri) that
receives the changed content Uri. This can help applications make
better decisions about how to interpret a change notification.

Change-Id: I8e35378b6485fe22c5bc240ba07557d269af0836
/frameworks/base/core/java/android/content/ContentService.java
86de0590b94bcce27e3038c27464bed510bb564a 23-Jan-2012 Jeff Brown <jeffbrown@google.com> Clean up content observer code.

Improved the documentation a little bit.

Fixed a bug in ContentService wherein if a ContentObserver was
passed as an argument and its deliverSelfNotifications() method
returned true, then notifyChange would tell all observers that
the change was a self-change even though it was only a self-change
from the perspective of the provided observer.

Deprecated ContentObservable.notifyChange since it is never
used and in general it shouldn't be because we want the notification
to be posted to the handler.

Change-Id: Idde49eb40777e011a068f2adae8a32f779dfb923
/frameworks/base/core/java/android/content/ContentService.java
1b64e0d8657463c0f7ce9b068a16a522cdfe7d28 18-Jul-2011 Dianne Hackborn <hackbod@google.com> Work on death recipient leaks in Activity Manager and Content Service.

This should fix a leak of process death recipients in the activity manager.

Also add debugging of content observers to try to track down what looks
like a leak of them in the content service.

Change-Id: Id6823679493ef0cde5307bb66490ebe31b878556
/frameworks/base/core/java/android/content/ContentService.java
43a17654cf4bfe7f1ec22bd8b7b32daccdf27c09 07-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These haven't been working since before 1.0.

Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
/frameworks/base/core/java/android/content/ContentService.java
c6a69559cb62bd20166c0c9684e64c60d779da38 28-Sep-2010 Fred Quintana <fredq@google.com> Add getCurrentSyncs() to the SDK, which replaces the deprecated
getCurrentSync().

Change-Id: I1112df41e48ed93ff4c0c5af4825dbdce0c4cccc
/frameworks/base/core/java/android/content/ContentService.java
ee1cdd0e605e9154b3b61d4bf7dd5aad9cab88ed 19-May-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I1612bf92bf47eb88299ed0e627e6662b23adc35a
f51266471cb6c3e824435ae6e416012a62266d52 22-Mar-2010 Anthony Newnam <anthony.newnam@garmin.com> Don't allow invalid Uris to be added as observers.

If a null segment is added, it will cause problems traversing the list
at a later point.

Change-Id: I5aa97b969cac7231e214168af7d3263b1c16f0a0
/frameworks/base/core/java/android/content/ContentService.java
d5e4fdc8a4743abc0d9fe3cb952a78f9ad078c6b 31-Mar-2010 Fred Quintana <fredq@google.com> some changes due to an API review
- make EntityIterator extend Iterator and thus not throw a
RemoteException, instead converting it into a RuntimeException.
- rename ActiveSyncInfo to SyncInfo
- change getActiveSync to getCurrentSync
- remove the accessors in SyncInfo and instead make the final
fields publicly accessible
- made AbstractThreadedSyncAdapter.cancelSync not take a thread

Change-Id: I99fde5585bc5f1e95f4873ffbba189074a8d6372
http://b/issue?id=2553539
http://b/issue?id=2553541
http://b/issue?id=2553550
/frameworks/base/core/java/android/content/ContentService.java
002ffad599964653186c01f8e07fadc82dc0acee 02-Mar-2010 Fred Quintana <fredq@google.com> change ObserverNode.binderDied() to lock the root node before manipulating
the observers tree by calling removeObserverLocked()

http://b/issue?id=2457485
/frameworks/base/core/java/android/content/ContentService.java
1b487ec44b6b5594914d52fa427bec4f29a60541 26-Feb-2010 Fred Quintana <fredq@google.com> expose some sync control methods
- ActiveSyncInfo
- ContentResolver.addStatusChangeListener
- SYNC_OBSERVER_TYPE_SETTINGS
- SYNC_OBSERVER_TYPE_PENDING
- SYNC_OBSERVER_TYPE_ACTIVE
- make the ContentService resilient to nulls passed in to the
status change listener registration and unregistration calls

bug http://b/issue?id=2337197
/frameworks/base/core/java/android/content/ContentService.java
c5d1c6db61f208b206b260f897bb5bbc64be4d97 27-Jan-2010 Fred Quintana <fredq@google.com> add sync polling

- added the ability to specify that a sync (of account/authority/extras)
should occur at a given frequency
- the existing daily poll code was replaced with seeding each
account/authority with a 24 hour periodic sync
- enhanced the "adb shell dumpsys content" output to show the
periodic syncs and when they will next run
/frameworks/base/core/java/android/content/ContentService.java
b752098e8d12d6e7925d97458078dbb896ca8a05 03-Sep-2009 Costin Manolache <costin@google.com> Sync status was ignoring account - the new UI has specific sync status for each account, so we need to use it.
/frameworks/base/core/java/android/content/ContentService.java
4a6679b97e0285c5b65ec5c0d9080ff90d3e9e81 17-Aug-2009 Fred Quintana <fredq@google.com> make syncadapter set whether the account is syncable
/frameworks/base/core/java/android/content/ContentService.java
5e787c42f2a6b3afc8ec8320a08d51b2d44b8614 17-Aug-2009 Fred Quintana <fredq@google.com> - add a "isSyncable" flag to a given account/authority pair that
indicates whether or not syncs should be attempted for it.
- add public methods to get and set this parameter
/frameworks/base/core/java/android/content/ContentService.java
ac9385ef3105fb7464e1f46049c62755a8b7f0e9 23-Jun-2009 Fred Quintana <fredq@google.com> - clean up the sync settings names to:
(get|set)SyncAutomatically
(get|set)MasterSyncAutomatically
- change SYNC_EXTRAS_FORCE to SYNC_EXTRAS_MANUAL to mace clear that
this overrides the .*SyncAutomatically settings
- make ContentResolver methods that call the sync controls methods
in IContentService so that SDK users can use them
- rename startSync to requestSync to reinforce the fact that a sync
is not immediately or always started when this method is called
- add an Account parameter to all the sync settings and control methods
- change the sync control methods to take a String authority rather than a Uri uri
/frameworks/base/core/java/android/content/ContentService.java
7a1355950172b7a549820e9a2cd4a9b2099ec32f 06-May-2009 Dianne Hackborn <hackbod@google.com> merged 231cc608d06ffc31c24bf8aa8c8275bdd2636581
231cc608d06ffc31c24bf8aa8c8275bdd2636581 28-Apr-2009 Dianne Hackborn <hackbod@google.com> Rewrite SyncStorageEngine to use flat files and in-memory data structures.

The previous implementation used a database for storing all of its state, which could cause
a significant amount of IO activity as its tables were updated through the stages of a sync.
This new implementation replaces that in-memory data structures, with hand-written code
for writing them to persistent storage.

There are now 4 files associated with this class, holding various pieces of its state that
should be consistent. These are everything from a main XML file of account information that
must always be retained, to a binary file of per-day statistics that can be thrown away at
any time. Writes of these files as scheduled at various times based on their importance of
the frequency at which they change.

Because the database no longer exists, there needs to be a new explicit interface for
interacting with the sync manager database. This is provided by new APIs on IContentService,
with a hidden method on ContentResolver to retrieve the IContentService so that various
system entities can use it. Other changes in other projects are required to update to the
new API.

The goal here is to have as little an impact on the code and functionality outside of
SyncStorageEngine, though due to the necessary change in API it is still somewhat extensive.
/frameworks/base/core/java/android/content/ContentService.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/content/ContentService.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/content/ContentService.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/content/ContentService.java