summaryrefslogtreecommitdiff
path: root/core/java/android/app/AppOpsManager.java
diff options
context:
space:
mode:
authorPeter Visontay <pvisontay@google.com>2017-11-14 19:34:59 +0000
committerPeter Visontay <pvisontay@google.com>2017-12-13 14:59:51 +0000
commit1195083c0d658d489e4786e9e10ec028cb1109cf (patch)
treeb7fdaba53a5c9260a5cd480eb696e9004be54d7c /core/java/android/app/AppOpsManager.java
parentba5aaf1867650ab3c3fa55d0b473a41639b4da8d (diff)
Log an App Op when an accessibility service is registered.
Bug: 63907873 Test: manually tested that the app op is being logged for TalkBack when it's being registered as an accessibility service. Change-Id: I10f36a86067950ef57c7afc7bf2f01efff46689c
Diffstat (limited to 'core/java/android/app/AppOpsManager.java')
-rw-r--r--core/java/android/app/AppOpsManager.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index c1a51044e349..c9435746f287 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -258,8 +258,10 @@ public class AppOpsManager {
public static final int OP_CHANGE_WIFI_STATE = 71;
/** @hide Request package deletion through package installer */
public static final int OP_REQUEST_DELETE_PACKAGES = 72;
+ /** @hide Bind an accessibility service. */
+ public static final int OP_BIND_ACCESSIBILITY_SERVICE = 73;
/** @hide */
- public static final int _NUM_OP = 73;
+ public static final int _NUM_OP = 74;
/** Access to coarse location information. */
public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
@@ -503,6 +505,7 @@ public class AppOpsManager {
OP_RUN_ANY_IN_BACKGROUND,
OP_CHANGE_WIFI_STATE,
OP_REQUEST_DELETE_PACKAGES,
+ OP_BIND_ACCESSIBILITY_SERVICE,
};
/**
@@ -583,6 +586,7 @@ public class AppOpsManager {
null, // OP_RUN_ANY_IN_BACKGROUND
null, // OP_CHANGE_WIFI_STATE
null, // OP_REQUEST_DELETE_PACKAGES
+ null, // OP_BIND_ACCESSIBILITY_SERVICE
};
/**
@@ -663,6 +667,7 @@ public class AppOpsManager {
"RUN_ANY_IN_BACKGROUND",
"CHANGE_WIFI_STATE",
"REQUEST_DELETE_PACKAGES",
+ "BIND_ACCESSIBILITY_SERVICE",
};
/**
@@ -743,6 +748,7 @@ public class AppOpsManager {
null, // no permission for OP_RUN_ANY_IN_BACKGROUND
Manifest.permission.CHANGE_WIFI_STATE,
Manifest.permission.REQUEST_DELETE_PACKAGES,
+ Manifest.permission.BIND_ACCESSIBILITY_SERVICE,
};
/**
@@ -824,6 +830,7 @@ public class AppOpsManager {
null, // OP_RUN_ANY_IN_BACKGROUND
null, // OP_CHANGE_WIFI_STATE
null, // REQUEST_DELETE_PACKAGES
+ null, // OP_BIND_ACCESSIBILITY_SERVICE
};
/**
@@ -904,6 +911,7 @@ public class AppOpsManager {
false, // OP_RUN_ANY_IN_BACKGROUND
false, // OP_CHANGE_WIFI_STATE
false, // OP_REQUEST_DELETE_PACKAGES
+ false, // OP_BIND_ACCESSIBILITY_SERVICE
};
/**
@@ -983,6 +991,7 @@ public class AppOpsManager {
AppOpsManager.MODE_ALLOWED, // OP_RUN_ANY_IN_BACKGROUND
AppOpsManager.MODE_ALLOWED, // OP_CHANGE_WIFI_STATE
AppOpsManager.MODE_ALLOWED, // REQUEST_DELETE_PACKAGES
+ AppOpsManager.MODE_ALLOWED, // OP_BIND_ACCESSIBILITY_SERVICE
};
/**
@@ -1066,6 +1075,7 @@ public class AppOpsManager {
false, // OP_RUN_ANY_IN_BACKGROUND
false, // OP_CHANGE_WIFI_STATE
false, // OP_REQUEST_DELETE_PACKAGES
+ false, // OP_BIND_ACCESSIBILITY_SERVICE
};
/**