summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorShafik Nassar <shafik@google.com>2020-02-14 11:10:18 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-02-14 11:10:18 +0000
commit5a885658c9fcb7a3c0904bbeb419f7e730a90b49 (patch)
tree0de61c6a6f721e40ab87967aad525476dd7d1f75 /core/java
parentf5318efa64514eff7e14d9cb107c35f75579854a (diff)
parent0f2c4d12eb97440eead1d4e4f17f44add5286c65 (diff)
Merge "Add intent to clear app cache"
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/os/storage/StorageManager.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index bb1dafc50484..8d04df0560f5 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -215,6 +215,20 @@ public class StorageManager {
public static final String ACTION_MANAGE_STORAGE = "android.os.storage.action.MANAGE_STORAGE";
/**
+ * Activity Action: Allows the user to free up space by clearing app external cache directories.
+ * The intent doesn't automatically clear cache, but shows a dialog and lets the user decide.
+ * <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.
+ */
+ @RequiresPermission(android.Manifest.permission.MANAGE_EXTERNAL_STORAGE)
+ @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_CLEAR_APP_CACHE = "android.os.storage.action.CLEAR_APP_CACHE";
+
+ /**
* Extra {@link UUID} used to indicate the storage volume where an
* application is interested in allocating or managing disk space.
*