summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/DeviceStorageMonitorService.java
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a Lifecycle for system servicesAdam Lesinski2013-12-121-491/+0
| | | | | | | | | | | | | | | | | | | Cherry-picked from klp-modular-dev Provide an abstract class for system services to extend from, similar to the android.app.Service. This will allow services to receive events in a uniform way, and will allow services to be created and started in the correct order regardless of whether or not a particular service exists. Similar to android.app.Service, services are meant to implement Binder interfaces as inner classes. This prevents services from having incestuous access to each other and makes them use the public API. Change-Id: Iaacfee8d5f080a28d7cc606761f4624673ed390f
* Better API for low disk space warnings.Jeff Sharkey2013-02-151-57/+30
| | | | | | | | | | | Provides uniform interface to ask about low disk thresholds; can be mocked by other tests. Opens door to adjust thresholds based on disk type. Switch monitor service to using new API, and use filesystem paths from Environment instead of hard-coding. Change-Id: Ifdb536e36a453f1b67bc65849037ec3cc0232cf2
* Fix issue #7274813: A few sticky broadcasts aren't being sent to all usersDianne Hackborn2012-10-021-2/+2
| | | | Change-Id: I2fc89de36be0709946f562f64002d0f6d223401f
* Migrate more Secure settings to Global.Jeff Sharkey2012-09-271-10/+10
| | | | | | | | Migrate networking, storage, battery, DropBox, and PackageManager related Secure settings to Global table. Bug: 7232014, 7231331, 7231198 Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
* Fix issue #7214090: Need to be able to post notifications to all usersDianne Hackborn2012-09-241-3/+5
| | | | | | | | | | | | | | | Also fix a bunch of system services that should be doing this. And while doing that, found I needed to fix PendingIntent to evaluate USER_CURRENT at the point of sending, not creation. Note that this may end up with us having some notification shown to non-primary users that lead to settings UI that should only be for the primary user (such as the vpn notification). I'm not sure what to do about this, maybe we need a different UI to come up there or something, but showing the actual notification for those users at least seems less broken than not telling them at all. Change-Id: Iffc51e2d7c847e3d05064d292ab93937646a1ab7
* Improve multi-user broadcasts.Dianne Hackborn2012-08-301-4/+5
| | | | | | | | | | | | | | | | | | | You can now use ALL and CURRENT when sending broadcasts, to specify where the broadcast goes. Sticky broadcasts are now correctly separated per user, and registered receivers are filtered based on the requested target user. New Context APIs for more kinds of sending broadcasts as users. Updating a bunch of system code that sends broadcasts to explicitly specify which user the broadcast goes to. Made a single version of the code for interpreting the requested target user ID that all entries to activity manager (start activity, send broadcast, start service) use. Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
* Improve cleanup of file caches.Dianne Hackborn2012-07-121-16/+93
| | | | | | | | | | | | | | | | | | | This rewrites installd's code for deleting cache files to be better: - Isn't really stupid about just deleting directories in the order they are found on the filesytem; now collects all cache files and sorts them by mod time to determine which to delete. - Also deletes cache files in /data/media and for all users. This also tweaks DeviceStorageMonitor to be a little smarter about deciding when to flush cache files, having upper and lower limits that it allows memory to get down to and then flash files to reach the higher free storage limit. This should reduce the amount that we perform flushing when starting to reach the storage limit. Finally add a new pm command to force a cache flush. Change-Id: I02229038e1ad553d1168393e5cb6d5025933271d
* Log when /cache files are deleted.Jeff Sharkey2012-04-191-0/+16
| | | | | Bug: 6362988 Change-Id: Ib8497453c45612be5b83035eeaf3abe6d716ccbf
* Fix issue #6266651: Low storage warning takes long time to sort apps by usageDianne Hackborn2012-04-111-1/+4
| | | | | | | | On a device with emulated external storage, the low storage notification should go to the main storage settings UI. This shows the user all of the things that could be causing their storage to be low. Change-Id: I9c345b6cb7abbabc24a67c7e104d077ecbbfb86d
* Fix free_cache to actually workKenny Root2011-12-011-1/+0
| | | | | | | | | | This broke with some other path-related changes, so it was scanning for /data/*/cache instead of /data/data/*/cache Also remove redundant call to restat Bug: 5686310 Change-Id: Id1661f0f1337858fc9ead53c56ab7557f421c591
* Remove the deprecated things from Config.java. These haven't been working ↵Joe Onorato2011-04-071-2/+1
| | | | | | since before 1.0. Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
* Split PackageManagerService into subclassesKenny Root2011-03-221-2/+2
| | | | | | | | Split PackageManagerService from one monolithic class with several inner classes to several classes. This will help determining how its data structures can be reshuffled to provide better separation of concerns. Change-Id: Ic7571daebdcf13ce08e08f34204c5bbf4140139b
* Revise free space checks for package installsKenny Root2011-03-141-0/+20
| | | | Change-Id: Ie72bbab77aa89a50ec096edc1f471eab74829e67
* Implement issue # 3255887 could CursorLoader offer...Dianne Hackborn2011-01-081-4/+8
| | | | | | | | | | | | | | | | | | ...to throttle contentobserver-based requeries Why yes, I guess it could. This also reworks AsyncTaskLoader to not generate multiple concurrent tasks if it is getting change notifications before the last background task is complete. And removes some of the old APIs that had been deprecated but need to be gone for final release. And fixes a few little problems with applying the wrong theme in system code. Change-Id: Ic7a665b666d0fb9d348e5f23595532191065884f
* Allow incoming SMS until internal storage is almost full.Jake Hamby2010-09-081-4/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for bug 2382830: new incoming SMS should not be rejected when running low on internal phone storage. Testing revealed that the /data partition should have at least 256 KiB available in order to prevent random app crashes (including system apps) due to SQLite transaction failures. With 256 KiB free, the device should safely boot without storage full errors. This takes into account the 36-40 KiB that the YAFFS2 filesystem reports as available even after the partition has been completely filled. I've set the default full threshold to 1 MiB to provide a generous safety margin. For this bug, I changed the DeviceStorageMonitorService demon to send two new hidden notifications for device storage "full" and "not full", when the free space falls below the full threshold (default 1 MiB, but configurable as a system setting), in addition to the existing storage low/okay notifications sent when the storage crosses the threshold of 90% full (also configurable). The SMS code was changed to use these new notifications so that it can accept messages until the data partition has been filled to the maximum safe capacity rather than stopping when it hits 90% full. There should be no negative impact on battery life because the additional check in the storage polling service should be offset by an optimization to cache the free threshold values which were previously being computed every time through the loop. While testing this change, I discovered that SMSDispatcher was being instantiated twice, the first time in GSMPhone/CDMAPhone, and the second time in SimSmsInterfaceManager / RuimSmsInterfaceManager. Changed the code to pass the original SMSDispatcher to the Sim/RuimSmsInterfaceManager constructor. Change-Id: Ie0c6d05294778ab6ee42e0fa01313af96d824c77
* Don't crash when low storage is encountered pre-boot completion.Jeff Hamilton2010-06-041-0/+2
| | | | | Bug: 2741633 Change-Id: Ic073ead64ff43b2e2c32b439756cd71c2b6550b8
* Switch the services library to using the new SlogJoe Onorato2010-03-011-15/+15
|
* move some system services from gservices to secure settingsDoug Zongker2010-01-071-22/+26
| | | | Change-Id: Ie2dfb99a2b42b2cc9310b858c044d8684e3493fa
* move event log tags used by system server into this packageDoug Zongker2009-12-041-6/+3
| | | | | | We can now locate event log tag definitions in individual packages (and java constants for the tag numbers get auto-generated), so move all the tags used by the system server into the package.
* when logging free space on /data, log /system and /cache as wellDoug Zongker2009-10-071-39/+65
| | | | | Report space free on system and cache so we can estimate bad block statistics for devices in the field.
* Make the internal storage monitor work correctly when internal storage is ↵Marco Nelissen2009-05-081-2/+2
| | | | very large.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+314
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-314/+0
|
* auto import from //branches/cupcake/...@132276The Android Open Source Project2009-02-191-19/+39
|
* auto import from //branches/cupcake/...@127436The Android Open Source Project2009-01-221-1/+1
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-0/+294