Properly set RESULT_OK for Deletion Helper.

If an app asks for a certain amount of storage, it can launch the
Deletion Helper using StorageManager.EXTRA_REQUESTED_BYTES as an intent
extra, providing a number of bytes to clear. If Deletion Helper clears
out that much storage, it should return RESULT_OK. We were not checking
this condition before.

This patch adds a condition check to see if we clear out enough storage.
If we do, we set RESULT_OK. RESULT_CANCELED is the default.

Bug: 121029845
Test: StorageManager robotests
Change-Id: I57bad0d2edea406277694625576f5a59f9398a52
2 files changed