diff options
-rw-r--r-- | core/java/android/accessibilityservice/UiTestAutomationBridge.java | 6 | ||||
-rw-r--r-- | services/java/com/android/server/accessibility/AccessibilityManagerService.java | 19 |
2 files changed, 11 insertions, 14 deletions
diff --git a/core/java/android/accessibilityservice/UiTestAutomationBridge.java b/core/java/android/accessibilityservice/UiTestAutomationBridge.java index 69195c1..30be374 100644 --- a/core/java/android/accessibilityservice/UiTestAutomationBridge.java +++ b/core/java/android/accessibilityservice/UiTestAutomationBridge.java @@ -83,7 +83,7 @@ public class UiTestAutomationBridge { * @return The event. */ public AccessibilityEvent getLastAccessibilityEvent() { - return mLastEvent; + return mLastEvent; } /** @@ -142,7 +142,7 @@ public class UiTestAutomationBridge { @Override public void onInterrupt() { - UiTestAutomationBridge.this.onInterrupt(); + UiTestAutomationBridge.this.onInterrupt(); } @Override @@ -189,7 +189,7 @@ public class UiTestAutomationBridge { final AccessibilityServiceInfo info = new AccessibilityServiceInfo(); info.eventTypes = AccessibilityEvent.TYPES_ALL_MASK; info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC; - info.flags |= AccessibilityNodeInfo.INCLUDE_NOT_IMPORTANT_VIEWS; + info.flags |= AccessibilityServiceInfo.INCLUDE_NOT_IMPORTANT_VIEWS; try { manager.registerUiTestAutomationService(mListener, info); diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java index e447218..1cb2092 100644 --- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -259,7 +259,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub updateInputFilterLocked(); sendStateToClientsLocked(); } - + return; } @@ -1266,16 +1266,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub mNotificationTimeout = info.notificationTimeout; mIsDefault = (info.flags & DEFAULT) != 0; - if (!mIsAutomation) { - final int targetSdkVersion = - info.getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion; - // TODO: Uncomment this line and remove the line below when JellyBean - // SDK version is finalized. - // if (targetSdkVersion >= Build.VERSION_CODES.JELLY_BEAN) { - if (targetSdkVersion > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { - mIncludeNotImportantViews = - (info.flags & INCLUDE_NOT_IMPORTANT_VIEWS) != 0; - } + if (mIsAutomation || info.getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion + // TODO: Uncomment this line and remove the line below when JellyBean + // SDK version is finalized. + // >= Build.VERSION_CODES.JELLY_BEAN) { + > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { + mIncludeNotImportantViews = + (info.flags & INCLUDE_NOT_IMPORTANT_VIEWS) != 0; } synchronized (mLock) { |