diff options
author | Guang Zhu <guangzhu@google.com> | 2012-05-08 23:09:24 -0700 |
---|---|---|
committer | Guang Zhu <guangzhu@google.com> | 2012-05-09 14:32:15 -0700 |
commit | df549f83810c6fa76be1845363ef69809a30e569 (patch) | |
tree | 800d0bfc5625be36e253cc19879d43c701ecd8ed /services/java/com/android/server/accessibility/AccessibilityManagerService.java | |
parent | bad417df657128a988b23a6b70b4d08633e4ac5a (diff) | |
download | frameworks_base-df549f83810c6fa76be1845363ef69809a30e569.zip frameworks_base-df549f83810c6fa76be1845363ef69809a30e569.tar.gz frameworks_base-df549f83810c6fa76be1845363ef69809a30e569.tar.bz2 |
Make UiTestAutomationBridge see non-important views again
This problem was introduced in I74df9c24. The intention of the
change was still let UiTestAutomationBridge see the
non-important views, but there were bugs in the implementation:
1. AccessibilityManagerService was not really updating
mIncludeNotImportantViews when mIsAutomation is true
2. Wrong constant is used to set the flag
Change-Id: Ia0a2e9ed9720bd0ea3a563e0b492e870a6ec1586
Diffstat (limited to 'services/java/com/android/server/accessibility/AccessibilityManagerService.java')
-rw-r--r-- | services/java/com/android/server/accessibility/AccessibilityManagerService.java | 19 |
1 files changed, 8 insertions, 11 deletions
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) { |