am 0fa15291: Merge "Make UiTestAutomationBridge see non-important views again" into jb-dev
* commit '0fa152912e55f2d08f0a8d1260332a81e5706694': Make UiTestAutomationBridge see non-important views again
This commit is contained in:
@@ -83,7 +83,7 @@ public class UiTestAutomationBridge {
|
|||||||
* @return The event.
|
* @return The event.
|
||||||
*/
|
*/
|
||||||
public AccessibilityEvent getLastAccessibilityEvent() {
|
public AccessibilityEvent getLastAccessibilityEvent() {
|
||||||
return mLastEvent;
|
return mLastEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -142,7 +142,7 @@ public class UiTestAutomationBridge {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInterrupt() {
|
public void onInterrupt() {
|
||||||
UiTestAutomationBridge.this.onInterrupt();
|
UiTestAutomationBridge.this.onInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -189,7 +189,7 @@ public class UiTestAutomationBridge {
|
|||||||
final AccessibilityServiceInfo info = new AccessibilityServiceInfo();
|
final AccessibilityServiceInfo info = new AccessibilityServiceInfo();
|
||||||
info.eventTypes = AccessibilityEvent.TYPES_ALL_MASK;
|
info.eventTypes = AccessibilityEvent.TYPES_ALL_MASK;
|
||||||
info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;
|
info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;
|
||||||
info.flags |= AccessibilityNodeInfo.INCLUDE_NOT_IMPORTANT_VIEWS;
|
info.flags |= AccessibilityServiceInfo.INCLUDE_NOT_IMPORTANT_VIEWS;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
manager.registerUiTestAutomationService(mListener, info);
|
manager.registerUiTestAutomationService(mListener, info);
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
|
|||||||
updateInputFilterLocked();
|
updateInputFilterLocked();
|
||||||
sendStateToClientsLocked();
|
sendStateToClientsLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1266,16 +1266,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
|
|||||||
mNotificationTimeout = info.notificationTimeout;
|
mNotificationTimeout = info.notificationTimeout;
|
||||||
mIsDefault = (info.flags & DEFAULT) != 0;
|
mIsDefault = (info.flags & DEFAULT) != 0;
|
||||||
|
|
||||||
if (!mIsAutomation) {
|
if (mIsAutomation || info.getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion
|
||||||
final int targetSdkVersion =
|
// TODO: Uncomment this line and remove the line below when JellyBean
|
||||||
info.getResolveInfo().serviceInfo.applicationInfo.targetSdkVersion;
|
// SDK version is finalized.
|
||||||
// TODO: Uncomment this line and remove the line below when JellyBean
|
// >= Build.VERSION_CODES.JELLY_BEAN) {
|
||||||
// SDK version is finalized.
|
> Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
|
||||||
// if (targetSdkVersion >= Build.VERSION_CODES.JELLY_BEAN) {
|
mIncludeNotImportantViews =
|
||||||
if (targetSdkVersion > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
|
(info.flags & INCLUDE_NOT_IMPORTANT_VIEWS) != 0;
|
||||||
mIncludeNotImportantViews =
|
|
||||||
(info.flags & INCLUDE_NOT_IMPORTANT_VIEWS) != 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
|
|||||||
Reference in New Issue
Block a user