Add idle service to clean orphan downloads.
authorJeff Sharkey <jsharkey@android.com>
Thu, 6 Feb 2014 23:19:01 +0000 (15:19 -0800)
committerJeff Sharkey <jsharkey@android.com>
Thu, 6 Feb 2014 23:46:29 +0000 (15:46 -0800)
commit1f2c2c560400ba60c5b9dfd6fd4f5e73b232803a
treea6bc6e85c8fa25e7e266ce0d30f5d6a29c814817
parentdffbb9c4567e9d29d19964a83129e38dceab7055
Add idle service to clean orphan downloads.

Periodically reconcile database against disk contents.  This handles
the case where a user/app deletes files directly from disk without
updating the database, and the rare case where a database delete
didn't make it to deleting the underlying file.

Also cleans up any downloads belonging to a UID when removed.

Bug: 12924143
Change-Id: I4899d09df7ef71f2625491ac01ceeafa8a2013ce
AndroidManifest.xml
src/com/android/providers/downloads/DownloadIdleService.java [new file with mode: 0644]
src/com/android/providers/downloads/DownloadProvider.java
src/com/android/providers/downloads/DownloadReceiver.java
src/com/android/providers/downloads/DownloadThread.java
src/com/android/providers/downloads/StorageUtils.java