Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c0e293e authored by alanv's avatar alanv
Browse files

Don't override sendAccessibilityEvent() in ContactTileRow.

Hides the row (but not its children) from node traversal by setting it as
not important for accessibility.

Bug: 7486402
Change-Id: Ib223d3703fb24b7d3639d9b8b8934f6333df293c
parent c9001cd4
Loading
Loading
Loading
Loading
+3 −8
Original line number Original line Diff line number Diff line
@@ -515,6 +515,9 @@ public class ContactTileAdapter extends BaseAdapter {
            super(context);
            super(context);
            mItemViewType = itemViewType;
            mItemViewType = itemViewType;
            mLayoutResId = getLayoutResourceId(mItemViewType);
            mLayoutResId = getLayoutResourceId(mItemViewType);

            // Remove row (but not children) from accessibility node tree.
            setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
        }
        }


        /**
        /**
@@ -654,14 +657,6 @@ public class ContactTileAdapter extends BaseAdapter {
            }
            }
            setMeasuredDimension(width, imageSize + getChildAt(0).getPaddingBottom());
            setMeasuredDimension(width, imageSize + getChildAt(0).getPaddingBottom());
        }
        }

        @Override
        public void sendAccessibilityEvent(int eventType) {
            // This method is called when the child tile is INVISIBLE (meaning "empty"), and the
            // Accessibility Manager needs to find alternative content description to speak.
            // Here, we ignore the default behavior, since we don't want to let the manager speak
            // a contact name for the tile next to the INVISIBLE tile.
        }
    }
    }


    /**
    /**