Merge "Fix finding views by accessibility id." into mnc-dev
This commit is contained in:
@@ -18290,7 +18290,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
if (accessibilityId < 0) {
|
||||
return null;
|
||||
}
|
||||
return findViewByAccessibilityIdTraversal(accessibilityId);
|
||||
View view = findViewByAccessibilityIdTraversal(accessibilityId);
|
||||
if (view != null) {
|
||||
return view.includeForAccessibility() ? view : null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1173,6 +1173,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
if (foundView != null) {
|
||||
return foundView;
|
||||
}
|
||||
|
||||
if (getAccessibilityNodeProvider() != null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final int childrenCount = mChildrenCount;
|
||||
final View[] children = mChildren;
|
||||
for (int i = 0; i < childrenCount; i++) {
|
||||
@@ -1182,6 +1187,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
return foundView;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user