am df82905c: Merge "Update the public APIs for finding views by text to optionally use content description."

* commit 'df82905cf3ceb9192dc8087f934081f809d99bcf':
  Update the public APIs for finding views by text to optionally use content description.
This commit is contained in:
Dianne Hackborn
2011-09-14 22:35:45 -07:00
committed by Android Git Automerger
9 changed files with 84 additions and 24 deletions

View File

@@ -489,14 +489,16 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
if (oldService != null) {
tryRemoveServiceLocked(oldService);
}
// Now this service is enabled.
mEnabledServices.add(componentName);
// Also make sure this service is the only one.
Settings.Secure.putString(mContext.getContentResolver(),
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
componentName.flattenToString());
// This API is intended for testing so enable accessibility to make
// sure clients can start poking with the window content.
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.ACCESSIBILITY_ENABLED, 1);
// Also disable all accessibility services to avoid interference
// with the tests.
Settings.Secure.putString(mContext.getContentResolver(),
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, "");
}
AccessibilityServiceInfo accessibilityServiceInfo = new AccessibilityServiceInfo();
accessibilityServiceInfo.eventTypes = AccessibilityEvent.TYPES_ALL_MASK;