From 9e065121fa4cd7443c648f29c2f4c3a276041be8 Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Fri, 15 Feb 2013 15:24:09 -0800 Subject: Dynamically configurable accessibility flags mishandled. A bug was preventing clearing dynamically settable accessibility service flags. bug:8051095 Change-Id: I6844b2f44e323bc741ac39983a892f1d28f3132b --- .../accessibility/AccessibilityManagerService.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'services') diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java index e5cba62..9c02a46 100644 --- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -1640,14 +1640,18 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { if (mIsAutomation || info.getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.JELLY_BEAN) { - mFetchFlags |= (info.flags - & AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS) != 0 ? - AccessibilityNodeInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS : 0; + if ((info.flags & AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS) != 0) { + mFetchFlags |= AccessibilityNodeInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS; + } else { + mFetchFlags &= ~AccessibilityNodeInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS; + } } - mFetchFlags |= (info.flags - & AccessibilityServiceInfo.FLAG_REPORT_VIEW_IDS) != 0 ? - AccessibilityNodeInfo.FLAG_REPORT_VIEW_IDS : 0; + if ((info.flags & AccessibilityServiceInfo.FLAG_REPORT_VIEW_IDS) != 0) { + mFetchFlags |= AccessibilityNodeInfo.FLAG_REPORT_VIEW_IDS; + } else { + mFetchFlags &= ~AccessibilityNodeInfo.FLAG_REPORT_VIEW_IDS; + } if (mResolveInfo != null) { mRequestTouchExplorationMode = (info.flags -- cgit v1.1