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

Commit 8b80baec authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Fixing non-scrolling of workspace view after opening/closing AllApps...

Merge "Fixing non-scrolling of workspace view after opening/closing AllApps vew. The reason for non-scrolling was excluding the pages view from the accessibility hierarchy by marking it as non-important. So, I just removed the code manipulating [non]importance of the PagedView." into ub-launcher3-burnaby
parents 58376925 7af0d447
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2327,6 +2327,15 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
        if (getCurrentPage() > 0) {
            info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD);
        }
        info.setClassName(getClass().getName());

        // Accessibility-wise, PagedView doesn't support long click, so disabling it.
        // Besides disabling the accessibility long-click, this also prevents this view from getting
        // accessibility focus.
        info.setLongClickable(false);
        if (Utilities.isLmpOrAbove()) {
            info.removeAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK);
        }
    }

    @Override
+2 −8
Original line number Diff line number Diff line
@@ -325,7 +325,6 @@ public class Workspace extends PagedView

        // Disable multitouch across the workspace/all apps/customize tray
        setMotionEventSplittingEnabled(true);
        setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
    }

    @Override
@@ -2018,14 +2017,9 @@ public class Workspace extends PagedView
            for (int i = numCustomPages(); i < total; i++) {
                updateAccessibilityFlags((CellLayout) getPageAt(i), i);
            }
            if (mState == State.NORMAL) {
                setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
            } else {
                setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
            }
        } else {
            int accessible = mState == State.NORMAL ?
                    IMPORTANT_FOR_ACCESSIBILITY_NO :
                    IMPORTANT_FOR_ACCESSIBILITY_AUTO :
                        IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
            setImportantForAccessibility(accessible);
        }
@@ -2044,7 +2038,7 @@ public class Workspace extends PagedView
            page.setAccessibilityDelegate(mPagesAccessibilityDelegate);
        } else {
            int accessible = mState == State.NORMAL ?
                    IMPORTANT_FOR_ACCESSIBILITY_NO :
                    IMPORTANT_FOR_ACCESSIBILITY_AUTO :
                        IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS;
            page.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
            page.getShortcutsAndWidgets().setImportantForAccessibility(accessible);