summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/UiAutomationConnection.java
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2013-04-24 14:51:29 -0700
committerSvetoslav <svetoslavganov@google.com>2013-04-24 14:59:04 -0700
commit11adf6dc2438260c3e0d79cc189bcb4f6f15e9f4 (patch)
tree80a2ae3f97aaa2e9583d5e3750e4ec6c6f1184b8 /core/java/android/app/UiAutomationConnection.java
parent4c78306617dd67b92fdf19101c5dfde4e21172d9 (diff)
downloadframeworks_base-11adf6dc2438260c3e0d79cc189bcb4f6f15e9f4.tar.gz
frameworks_base-11adf6dc2438260c3e0d79cc189bcb4f6f15e9f4.tar.bz2
frameworks_base-11adf6dc2438260c3e0d79cc189bcb4f6f15e9f4.zip
The touch exploration capability is dynamically granted pre-JellyBeanMR2.
Since the enable touch exploration capability is dynamically granted by the user for apps targeting pre-JellybeanMR2 API level, we have to properly update the accessibility service info for that service and also avoid caching copies of the service info. bug:8633951 Change-Id: I83dd1c852706ec55d40cda7209ad842889fb970a
Diffstat (limited to 'core/java/android/app/UiAutomationConnection.java')
-rw-r--r--core/java/android/app/UiAutomationConnection.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/app/UiAutomationConnection.java b/core/java/android/app/UiAutomationConnection.java
index 5bc17fae1f9..607930c0be4 100644
--- a/core/java/android/app/UiAutomationConnection.java
+++ b/core/java/android/app/UiAutomationConnection.java
@@ -158,11 +158,15 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub {
private void registerUiTestAutomationServiceLocked(IAccessibilityServiceClient client) {
IAccessibilityManager manager = IAccessibilityManager.Stub.asInterface(
ServiceManager.getService(Context.ACCESSIBILITY_SERVICE));
- AccessibilityServiceInfo info = new AccessibilityServiceInfo(true);
+ AccessibilityServiceInfo info = new AccessibilityServiceInfo();
info.eventTypes = AccessibilityEvent.TYPES_ALL_MASK;
info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;
info.flags |= AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS
| AccessibilityServiceInfo.FLAG_REPORT_VIEW_IDS;
+ info.setCapabilities(AccessibilityServiceInfo.CAPABILITY_CAN_RETRIEVE_WINDOW_CONTENT
+ | AccessibilityServiceInfo.CAPABILITY_CAN_REQUEST_TOUCH_EXPLORATION
+ | AccessibilityServiceInfo.CAPABILITY_CAN_REQUEST_ENHANCED_WEB_ACCESSIBILITY
+ | AccessibilityServiceInfo.CAPABILITY_CAN_REQUEST_FILTER_KEY_EVENTS);
try {
// Calling out with a lock held is fine since if the system
// process is gone the client calling in will be killed.