File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -4171,10 +4171,12 @@ void onInitializeAccessibilityNodeInfoInternal(AccessibilityNodeInfo info) {
41714171 bounds.offset(locationOnScreen[0], locationOnScreen[1]);
41724172 info.setBoundsInScreen(bounds);
41734173
4174- ViewParent parent = getParent();
4175- if (parent instanceof View) {
4176- View parentView = (View) parent;
4177- info.setParent(parentView);
4174+ if ((mPrivateFlags & IS_ROOT_NAMESPACE) == 0) {
4175+ ViewParent parent = getParent();
4176+ if (parent instanceof View) {
4177+ View parentView = (View) parent;
4178+ info.setParent(parentView);
4179+ }
41784180 }
41794181
41804182 info.setPackageName(mContext.getPackageName());
Original file line number Diff line number Diff line change @@ -2229,14 +2229,10 @@ boolean dispatchPopulateAccessibilityEventInternal(AccessibilityEvent event) {
22292229 @ Override
22302230 void onInitializeAccessibilityNodeInfoInternal (AccessibilityNodeInfo info ) {
22312231 super .onInitializeAccessibilityNodeInfoInternal (info );
2232- // If the view is not the topmost one in the view hierarchy and it is
2233- // marked as the logical root of a view hierarchy, do not go any deeper.
2234- if ((!(getParent () instanceof ViewRootImpl )) && (mPrivateFlags & IS_ROOT_NAMESPACE ) != 0 ) {
2235- return ;
2236- }
22372232 for (int i = 0 , count = mChildrenCount ; i < count ; i ++) {
22382233 View child = mChildren [i ];
2239- if ((child .mViewFlags & VISIBILITY_MASK ) == VISIBLE ) {
2234+ if ((child .mViewFlags & VISIBILITY_MASK ) == VISIBLE
2235+ && (child .mPrivateFlags & IS_ROOT_NAMESPACE ) == 0 ) {
22402236 info .addChild (child );
22412237 }
22422238 }
You can’t perform that action at this time.
0 commit comments