diff options
author | Svetoslav <svetoslavganov@google.com> | 2013-04-22 18:34:02 -0700 |
---|---|---|
committer | Svetoslav <svetoslavganov@google.com> | 2013-04-23 17:44:00 -0700 |
commit | db7da0eb8b7d515c168d5b410764e24c9a0f9431 (patch) | |
tree | 203e63c36f247904943614120e4772689ee762d5 /services/java/com/android/server/accessibility | |
parent | ea236f19e652942a7af384566c70cdd0c7f88c58 (diff) | |
download | frameworks_base-db7da0eb8b7d515c168d5b410764e24c9a0f9431.zip frameworks_base-db7da0eb8b7d515c168d5b410764e24c9a0f9431.tar.gz frameworks_base-db7da0eb8b7d515c168d5b410764e24c9a0f9431.tar.bz2 |
Fixing bugs exposed when moving accessibility CTS tests to UiAutomation.
1. UiAutomation#executeAndWaitForEvent method was invoking the passed
runnable while holding the lock which may lead to a deadlock. For
example: a runnable that calls getActivity() gets us into a state
like this.
2. UI automation services did not get all capabilities such a
service can have. Now a UI test service gets all of them.
3. When UiAutomation was exiting for event fired as a result of a
performed action, it was checking whether the received evnet time
is strictly before the time of executing the command that should
fire the event. However, if the execution is fast enough, i.e.
less than one millisecond, then the event time and the execution
time are the same. This was leading to a missed signal in rare
cases.
4. AccessibilityNodeInfoCache was not clearing the relevant state
for accessibility focus clearing event.
5. Accessibility text traversal in TextView was partially using text
and partially content description - broken. Now we are using the
text since for text view and content desc for other views. In other
words, we are using the most precise text we have.
6. AccessibilityManagerService was not granting capabilities of a
UiAutomation service - plainly wrong.
CTS change:https://googleplex-android-review.googlesource.com/#/c/300693/
bug:8695422
bug:8657560
Change-Id: I9afc5c3c69eb51f1c01930959232f44681b15e86
Diffstat (limited to 'services/java/com/android/server/accessibility')
-rw-r--r-- | services/java/com/android/server/accessibility/AccessibilityManagerService.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java index 2f64908..64dfd67 100644 --- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -542,7 +542,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { return -1; } - public void registerUiTestAutomationService(IBinder owner, IAccessibilityServiceClient serviceClient, + public void registerUiTestAutomationService(IBinder owner, + IAccessibilityServiceClient serviceClient, AccessibilityServiceInfo accessibilityServiceInfo) { mSecurityPolicy.enforceCallingPermission(Manifest.permission.RETRIEVE_WINDOW_CONTENT, FUNCTION_REGISTER_UI_TEST_AUTOMATION_SERVICE); @@ -1732,14 +1733,12 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { mFetchFlags &= ~AccessibilityNodeInfo.FLAG_REPORT_VIEW_IDS; } - if (mResolveInfo != null) { - mRequestTouchExplorationMode = (info.flags - & AccessibilityServiceInfo.FLAG_REQUEST_TOUCH_EXPLORATION_MODE) != 0; - mRequestEnhancedWebAccessibility = (info.flags - & AccessibilityServiceInfo.FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY) != 0; - mRequestFilterKeyEvents = (info.flags - & AccessibilityServiceInfo.FLAG_REQUEST_FILTER_KEY_EVENTS) != 0; - } + mRequestTouchExplorationMode = (info.flags + & AccessibilityServiceInfo.FLAG_REQUEST_TOUCH_EXPLORATION_MODE) != 0; + mRequestEnhancedWebAccessibility = (info.flags + & AccessibilityServiceInfo.FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY) != 0; + mRequestFilterKeyEvents = (info.flags + & AccessibilityServiceInfo.FLAG_REQUEST_FILTER_KEY_EVENTS) != 0; } /** |