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

Commit 004ff172 authored by Tony Huang's avatar Tony Huang Committed by android-build-merger
Browse files

Merge "Fix directory list a11y bug" into qt-dev am: ade16af5

am: b1dc40b4

Change-Id: Id843c88d976ba7d17309e9b7204dbf56689ee4bd
parents 767232c9 b1dc40b4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ public class AccessibilityEventRouter extends RecyclerViewAccessibilityDelegate
                if (holder instanceof DocumentHolder) {
                    if (((DocumentHolder)holder).getItemDetails() != null) {
                        info.addAction(AccessibilityActionCompat.ACTION_CLICK);
                        info.addAction(AccessibilityNodeInfoCompat.ACTION_LONG_CLICK);
                    }
                } else {
                    info.addAction(AccessibilityActionCompat.ACTION_CLICK);
+11 −2
Original line number Diff line number Diff line
@@ -764,9 +764,18 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
    }

    private boolean onAccessibilityClick(View child) {
        if (mSelectionMgr.hasSelection()) {
            final String id = getModelId(child);
            if (mSelectionMgr.isSelected(id)) {
                mSelectionMgr.deselect(id);
            } else {
                mSelectionMgr.select(id);
            }
        } else {
            DocumentHolder holder = getDocumentHolder(child);
            mActions.openItem(holder.getItemDetails(), ActionHandler.VIEW_TYPE_PREVIEW,
                ActionHandler.VIEW_TYPE_REGULAR);
        }
        return true;
    }