Cleaner I/O.
authorJeff Sharkey <jsharkey@android.com>
Thu, 6 Dec 2012 23:54:44 +0000 (15:54 -0800)
committerJeff Sharkey <jsharkey@android.com>
Thu, 13 Dec 2012 23:42:32 +0000 (15:42 -0800)
commit5cff4ecb10e89e4fb39cd9e39b8753a31efbe3cc
tree9713a0f3b22fb5e025847acde2accba0a8a3b3fe
parent1244a63f799ab689a2d7d94415133be26580ae70
Cleaner I/O.

This cleans up writing of downloaded data by always writing through
OutputStream interface, which applies DRM if needed.  Hands I/O
streams along with method calls to give clearer chain of ownership.

Only retry writes once after verifying free space. Remove
checkCanHandleDownload() check, since most downloads are now using
public API.  Release DrmManagerClient sessions when finished.

Change-Id: I49e479089a8218690b556d31ec65a030930ad368
src/com/android/providers/downloads/DownloadDrmHelper.java
src/com/android/providers/downloads/DownloadThread.java
src/com/android/providers/downloads/DrmConvertSession.java [deleted file]
src/com/android/providers/downloads/Helpers.java
src/com/android/providers/downloads/OpenHelper.java