summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jackal Guo <jackalguo@google.com> 2019-02-14 15:27:25 +0800
committer Jackal Guo <jackalguo@google.com> 2019-02-19 18:07:34 +0800
commit03e67da0fbcea54de02445e3c1bc2fe00113d705 (patch)
tree475bac5a25ac30060a89ec66ea25545c26d6dc79
parentbad68326231489f83149c3a3f6230d3ff0402f01 (diff)
Add Intent and permission for a11y service toggle screen
Add an Intent to open individual a11y service toggle screen, and this Intent also needs to be protected by a dedicated permission. Bug: 123693167 Test: atest PermissionPolicyTest Change-Id: I058ab17b7f5819aa95205ae72e61af17d04b5df1
-rw-r--r--api/system-current.txt2
-rw-r--r--core/java/android/provider/Settings.java16
-rw-r--r--core/res/AndroidManifest.xml7
3 files changed, 25 insertions, 0 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index fb2b9e1e05fb..fe9233613af6 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -120,6 +120,7 @@ package android {
field public static final String NOTIFY_TV_INPUTS = "android.permission.NOTIFY_TV_INPUTS";
field public static final String OBSERVE_APP_USAGE = "android.permission.OBSERVE_APP_USAGE";
field public static final String OBSERVE_ROLE_HOLDERS = "android.permission.OBSERVE_ROLE_HOLDERS";
+ field public static final String OPEN_ACCESSIBILITY_DETAILS_SETTINGS = "android.permission.OPEN_ACCESSIBILITY_DETAILS_SETTINGS";
field public static final String OVERRIDE_WIFI_CONFIG = "android.permission.OVERRIDE_WIFI_CONFIG";
field public static final String PACKAGE_VERIFICATION_AGENT = "android.permission.PACKAGE_VERIFICATION_AGENT";
field public static final String PACKET_KEEPALIVE_OFFLOAD = "android.permission.PACKET_KEEPALIVE_OFFLOAD";
@@ -5954,6 +5955,7 @@ package android.provider {
}
public final class Settings {
+ field public static final String ACTION_ACCESSIBILITY_DETAILS_SETTINGS = "android.settings.ACCESSIBILITY_DETAILS_SETTINGS";
field public static final String ACTION_ENTERPRISE_PRIVACY_SETTINGS = "android.settings.ENTERPRISE_PRIVACY_SETTINGS";
field public static final String ACTION_LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS = "android.settings.LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS";
field public static final String ACTION_REQUEST_ENABLE_CONTENT_CAPTURE = "android.settings.REQUEST_ENABLE_CONTENT_CAPTURE";
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index d925d7ee2676..74172d7353d9 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -308,6 +308,22 @@ public final class Settings {
"android.settings.ACCESSIBILITY_SETTINGS";
/**
+ * Activity Action: Show detail settings of a particular accessibility service.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
+ * <p>
+ * Input: {@link Intent#EXTRA_COMPONENT_NAME} must specify the accessibility service component
+ * name to be shown.
+ * <p>
+ * Output: Nothing.
+ * @hide
+ **/
+ @SystemApi
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_ACCESSIBILITY_DETAILS_SETTINGS =
+ "android.settings.ACCESSIBILITY_DETAILS_SETTINGS";
+
+ /**
* Activity Action: Show settings to control access to usage information.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 5b74d90608f7..57d3c61b50eb 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2936,6 +2936,13 @@
<permission android:name="android.permission.TEMPORARY_ENABLE_ACCESSIBILITY"
android:protectionLevel="signature" />
+ <!-- @SystemApi Allows an application to launch detail settings activity of a particular
+ accessibility service.
+ <p>Not for use by third-party applications.
+ @hide -->
+ <permission android:name="android.permission.OPEN_ACCESSIBILITY_DETAILS_SETTINGS"
+ android:protectionLevel="signature|installer" />
+
<!-- @SystemApi Allows an application to watch and control how activities are
started globally in the system. Only for is in debugging
(usually the monkey command).