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

Commit c940eada authored by Andrew Lee's avatar Andrew Lee
Browse files

Fix Talkback focus for call log action views.

Bug: 21448455
Change-Id: Icb9f37643d12dde2d46743d2ce3aa2fade7a68a1
parent a56893c1
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -164,11 +164,16 @@ public class CallLogAdapter extends GroupingListAdapter
     */
    private AccessibilityDelegate mAccessibilityDelegate = new AccessibilityDelegate() {
        @Override
        public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child,
                AccessibilityEvent event) {
        public boolean onRequestSendAccessibilityEvent(
                ViewGroup host, View child, AccessibilityEvent event) {
            if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED) {
                // Only expand if actions are not already expanded, because triggering the expand
                // function on clicks causes the action views to lose the focus indicator.
                CallLogListItemViewHolder viewHolder = (CallLogListItemViewHolder) host.getTag();
                if (mCurrentlyExpandedPosition != viewHolder.getAdapterPosition()) {
                    expandViewHolderActions((CallLogListItemViewHolder) host.getTag());
                }
            }
            return super.onRequestSendAccessibilityEvent(host, child, event);
        }
    };