summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorShafik Nassar <shafik@google.com>2020-01-10 10:26:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-01-10 10:26:07 +0000
commitbaf293509925fa9f0ebfde075b9fd192e1d93b5f (patch)
tree332c621b00c21ecfffbd1510e48ebaa391d5158b /core/java/android
parent5835b591d2ae9cafb8fa41d73bc5b85d9e76f714 (diff)
parente6c41e5cbffeb8b99223376566119c38ec3fbe27 (diff)
Merge "Add Intent Actions to control OP_MANAGE_EXTERNAL_STORAGE"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/provider/Settings.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 9ee4cc30949d..e08f966981bf 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -14404,6 +14404,42 @@ public final class Settings {
};
/**
+ * Activity Action: Show screen for controlling which apps have access to manage external
+ * storage.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
+ * <p>
+ * If you want to control a specific app's access to manage external storage, use
+ * {@link #ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION} instead.
+ * <p>
+ * Output: Nothing.
+ * @see #ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION =
+ "android.settings.MANAGE_ALL_FILES_ACCESS_PERMISSION";
+
+ /**
+ * Activity Action: Show screen for controlling if the app specified in the data URI of the
+ * intent can manage external storage.
+ * <p>
+ * Launching the corresponding activity requires the permission
+ * {@link Manifest.permission#MANAGE_EXTERNAL_STORAGE}.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
+ * <p>
+ * Input: The Intent's data URI MUST specify the application package name whose ability of
+ * managing external storage you want to control.
+ * For example "package:com.my.app".
+ * <p>
+ * Output: Nothing.
+ * @see #ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION =
+ "android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION";
+
+ /**
* Performs a strict and comprehensive check of whether a calling package is allowed to
* write/modify system settings, as the condition differs for pre-M, M+, and
* privileged/preinstalled apps. If the provided uid does not match the