Update documentation for ACTION_CLEAR_APP_CACHE

The actual cache clearing is not async anymore, so we can report the
status to the calling app. Here, we just change the documentation to
make the caller aware of the 3rd possible activity result: EIO.

This value is returned if an error happens while MediaProvider is
clearing the cache. In this case, we don't know how much of the cache
was deleted, if at all.

Test: build
Bug: 155290762
Change-Id: I3a04a9b5b6b07c6ec61e97a4cb0d3bc8b10b0370
This commit is contained in:
shafik
2020-05-15 14:54:07 +01:00
committed by Shafik Nassar
parent 8fdb8d4f34
commit 75bb8caa55

View File

@@ -226,9 +226,10 @@ public class StorageManager {
* <p>
* This intent should be launched using
* {@link Activity#startActivityForResult(Intent, int)} so that the user
* knows which app is requesting to clear cache. The returned result will
* be {@link Activity#RESULT_OK} if the activity was launched and the user accepted to clear
* cache, or {@link Activity#RESULT_CANCELED} otherwise.
* knows which app is requesting to clear cache. The returned result will be:
* {@link Activity#RESULT_OK} if the activity was launched and all cache was cleared,
* {@link OsConstants#EIO} if an error occurred while clearing the cache or
* {@link Activity#RESULT_CANCELED} otherwise.
*/
@RequiresPermission(android.Manifest.permission.MANAGE_EXTERNAL_STORAGE)
@SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)