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

Commit 7a2e4b8f authored by Maxim Bogatov's avatar Maxim Bogatov Committed by Android (Google) Code Review
Browse files

Merge "Let TextView clear accessibility selection index" into mnc-dev

parents 3acd1603 1fa819b3
Loading
Loading
Loading
Loading
+21 −25
Original line number Diff line number Diff line
@@ -8837,12 +8837,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                    | AccessibilityNodeInfo.MOVEMENT_GRANULARITY_LINE
                    | AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PARAGRAPH
                    | AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
            info.addAction(AccessibilityNodeInfo.ACTION_SET_SELECTION);
        }

        if (isFocused()) {
            if (canSelectText()) {
                info.addAction(AccessibilityNodeInfo.ACTION_SET_SELECTION);
            }
            if (canCopy()) {
                info.addAction(AccessibilityNodeInfo.ACTION_COPY);
            }
@@ -8931,7 +8929,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                }
            } return false;
            case AccessibilityNodeInfo.ACTION_SET_SELECTION: {
                if (isFocused() && canSelectText()) {
                ensureIterableTextForAccessibilitySelectable();
                CharSequence text = getIterableTextForAccessibility();
                if (text == null) {
@@ -8956,7 +8953,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                        return true;
                    }
                }
                }
            } return false;
            case AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY:
            case AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY: {