From e82705b52e3a1453f50b26cf6b3c0f08b15001c0 Mon Sep 17 00:00:00 2001 From: Ivan Chiang Date: Fri, 5 Mar 2021 16:52:13 +0800 Subject: [PATCH] Add the intent to navigate to MANAGE_MEDIA permission page Test: m -j Test: atest AvailableIntentsTest Bug: 181112025 Change-Id: I08ca853c96bf83fe51e6e09f47e1ee052d2a7453 --- core/api/current.txt | 1 + core/java/android/provider/Settings.java | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/core/api/current.txt b/core/api/current.txt index 2b5196b3b5f7f..d6a6d43eb040d 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -34829,6 +34829,7 @@ package android.provider { field public static final String ACTION_QUICK_ACCESS_WALLET_SETTINGS = "android.settings.QUICK_ACCESS_WALLET_SETTINGS"; field public static final String ACTION_QUICK_LAUNCH_SETTINGS = "android.settings.QUICK_LAUNCH_SETTINGS"; field public static final String ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"; + field public static final String ACTION_REQUEST_MANAGE_MEDIA = "android.settings.REQUEST_MANAGE_MEDIA"; field public static final String ACTION_REQUEST_SCHEDULE_EXACT_ALARM = "android.settings.REQUEST_SCHEDULE_EXACT_ALARM"; field public static final String ACTION_REQUEST_SET_AUTOFILL_SERVICE = "android.settings.REQUEST_SET_AUTOFILL_SERVICE"; field public static final String ACTION_SEARCH_SETTINGS = "android.search.action.SEARCH_SETTINGS"; diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 5d139d971328f..4caf36fa918f1 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -432,6 +432,20 @@ public final class Settings { public static final String ACTION_REQUEST_SCHEDULE_EXACT_ALARM = "android.settings.REQUEST_SCHEDULE_EXACT_ALARM"; + /** + * Activity Action: Show settings to allow configuration of + * {@link Manifest.permission#MANAGE_MEDIA} permission + * + * Input: Optionally, the Intent's data URI can specify the application package name to + * directly invoke the management GUI specific to the package name. For example + * "package:com.my.app". + *

+ * Output: Nothing. + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_REQUEST_MANAGE_MEDIA = + "android.settings.REQUEST_MANAGE_MEDIA"; + /** * Activity Action: Show settings to allow configuration of cross-profile access for apps *