From d82096eca34cbbd9aed52542dfaeb63bedb3bf08 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Mon, 22 Jan 2018 13:44:01 -0800 Subject: Added STORAGE_VOLUME_ACCESS_SETTINGS intent. Applications typically use this action to ask the user to revert the "Do not ask again" status of directory access requested made by StorageVolume.createAccessIntent(directory). Test: atest CtsAppSecurityHostTestCases:ScopedDirectoryAccessTest#testResetDoNotAskAgain Test: adb shell am start -a android.settings.STORAGE_VOLUME_ACCESS_SETTINGS Bug: 63720392 Change-Id: I1ed1a018a54013d88260e11ef9646aaed3a3a318 --- api/current.txt | 1 + core/java/android/provider/Settings.java | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/api/current.txt b/api/current.txt index b1f14d9ceda8..ff34b6822b9e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -35904,6 +35904,7 @@ package android.provider { field public static final java.lang.String ACTION_SETTINGS = "android.settings.SETTINGS"; field public static final java.lang.String ACTION_SHOW_REGULATORY_INFO = "android.settings.SHOW_REGULATORY_INFO"; field public static final java.lang.String ACTION_SOUND_SETTINGS = "android.settings.SOUND_SETTINGS"; + field public static final java.lang.String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS = "android.settings.STORAGE_VOLUME_ACCESS_SETTINGS"; field public static final java.lang.String ACTION_SYNC_SETTINGS = "android.settings.SYNC_SETTINGS"; field public static final java.lang.String ACTION_USAGE_ACCESS_SETTINGS = "android.settings.USAGE_ACCESS_SETTINGS"; field public static final java.lang.String ACTION_USER_DICTIONARY_SETTINGS = "android.settings.USER_DICTIONARY_SETTINGS"; diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 0e323f8570a0..7de56e196b20 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -1502,6 +1502,21 @@ public final class Settings { public static final String ACTION_REQUEST_SET_AUTOFILL_SERVICE = "android.settings.REQUEST_SET_AUTOFILL_SERVICE"; + /** + * Activity Action: Show screen for controlling which apps have access on volume directories. + *

+ * Input: Nothing. + *

+ * Output: Nothing. + *

+ * Applications typically use this action to ask the user to revert the "Do not ask again" + * status of directory access requests made by + * {@link android.os.storage.StorageVolume#createAccessIntent(String)}. + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_STORAGE_VOLUME_ACCESS_SETTINGS = + "android.settings.STORAGE_VOLUME_ACCESS_SETTINGS"; + // End of Intent actions for Settings /** -- cgit v1.2.3-59-g8ed1b