summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/ContentService.java
Commit message (Collapse)AuthorAgeFilesLines
* Make RegisteredServicesCache multi-user aware.Jeff Sharkey2012-10-091-2/+3
| | | | | | | | | | | | | | | | | | 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
* Multiuser awareness in content observer infrastructureChristopher Tate2012-09-201-4/+0
| | | | | | | | | | | | | | | | | | 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
* Disable content observer cross-user permission checks...Christopher Tate2012-09-191-0/+4
| | | | | | | | | ... until we have a solid fix for the singleton ContentProvider problem cases in place. Bug 7190837 Change-Id: Ibbef2ddc594896ba7b9217e2856c3e393f525af6
* Per-user content observer APIsChristopher Tate2012-09-171-34/+116
| | | | | | | | | | | | | | | | | | | | 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
* Rename UserId to UserHandle.Dianne Hackborn2012-08-161-17/+17
| | | | | | This is the start of turning this into a formal public API. Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
* Delay AccountManagerService initializationKenny Root2012-07-301-1/+4
| | | | | | | | | | 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
* Make SyncManager and AccountManagerService multi-user aware.Amith Yamasani2012-03-081-17/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Inform ContentObservers about the changed content Uri.Jeff Brown2012-01-231-1/+1
| | | | | | | | 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
* Clean up content observer code.Jeff Brown2012-01-231-12/+13
| | | | | | | | | | | | | | | | 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
* Work on death recipient leaks in Activity Manager and Content Service.Dianne Hackborn2011-07-171-8/+96
| | | | | | | | | 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
* Remove the deprecated things from Config.java. These haven't been working ↵Joe Onorato2011-04-071-3/+2
| | | | | | since before 1.0. Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
* Add getCurrentSyncs() to the SDK, which replaces the deprecatedFred Quintana2010-10-081-6/+2
| | | | | | getCurrentSync(). Change-Id: I1112df41e48ed93ff4c0c5af4825dbdce0c4cccc
* merge from open-source masterThe Android Open Source Project2010-05-191-0/+3
|\ | | | | | | Change-Id: I1612bf92bf47eb88299ed0e627e6662b23adc35a
| * Don't allow invalid Uris to be added as observers.Anthony Newnam2010-05-191-0/+3
| | | | | | | | | | | | | | If a null segment is added, it will cause problems traversing the list at a later point. Change-Id: I5aa97b969cac7231e214168af7d3263b1c16f0a0
* | some changes due to an API reviewFred Quintana2010-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | change ObserverNode.binderDied() to lock the root node before manipulatingFred Quintana2010-03-021-26/+27
| | | | | | | | | | | | the observers tree by calling removeObserverLocked() http://b/issue?id=2457485
* | expose some sync control methodsFred Quintana2010-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | - 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
* | add sync pollingFred Quintana2010-02-051-0/+38
|/ | | | | | | | | - 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
* Sync status was ignoring account - the new UI has specific sync status for ↵Costin Manolache2009-09-081-10/+10
| | | | each account, so we need to use it.
* make syncadapter set whether the account is syncableFred Quintana2009-08-181-1/+2
|
* - add a "isSyncable" flag to a given account/authority pair thatFred Quintana2009-08-171-0/+31
| | | | | indicates whether or not syncs should be attempted for it. - add public methods to get and set this parameter
* - clean up the sync settings names to:Fred Quintana2009-06-231-27/+44
| | | | | | | | | | | | | (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
* merged 231cc608d06ffc31c24bf8aa8c8275bdd2636581Dianne Hackborn2009-05-061-2/+168
|\
| * Rewrite SyncStorageEngine to use flat files and in-memory data structures.Dianne Hackborn2009-05-051-2/+167
|/ | | | | | | | | | | | | | | | | | | | | | 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.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+376
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-376/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+376