If freeCache deletes APK, give out of space error

After DownloadManager has downloaded an application to cache to install
during low memory condition, we try to free cache to fit the new
application. The free cache function deletes older files first, but it
will also delete the downloaded application (since it's in cache) as a
last resort since installd has no context about it.

This just changes the error code returned in this case so that we'll
give something more meaningful to the user. A later fix should actually
make this more sane. For instance: know which file to avoid deleting,
not even trying to delete anything if it won't arrive at the desired
free space.

Bug: 7684538
Change-Id: Ide77320fc51a4f692ef8042cb0eafe17b5cd279d
1 file changed