Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75bb8caa authored by shafik's avatar shafik Committed by Shafik Nassar
Browse files

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