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

Commit 5360eb63 authored by Wenyi Wang's avatar Wenyi Wang Committed by Android (Google) Code Review
Browse files

Merge "Correct the way of avoiding crash" into ub-contactsdialer-a-dev

parents 7c4f5a2f 19ea52b1
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -128,9 +128,10 @@ public class MultiSelectContactsListFragment extends DefaultContactBrowseListFra
                getAdapter().toggleSelectionOfContactId(Long.valueOf(contactId));
                // Manually send clicked event if there is a checkbox.
                // See b/24098561.  TalkBack will not read it otherwise.
                final int adjPosition = position + getListView().getHeaderViewsCount();
                if (getListView() != null && adjPosition < getListView().getChildCount()) {
                    getListView().getChildAt(adjPosition).sendAccessibilityEvent(AccessibilityEvent
                final int index = position + getListView().getHeaderViewsCount() - getListView()
                        .getFirstVisiblePosition();
                if (index >= 0 && index < getListView().getChildCount()) {
                    getListView().getChildAt(index).sendAccessibilityEvent(AccessibilityEvent
                            .TYPE_VIEW_CLICKED);
                }
            }