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

Commit 9b471535 authored by Riley Jones's avatar Riley Jones
Browse files

Changed textView's addExtraDataToAccessibilityNodeInfo() to avoid Out of...

Changed textView's addExtraDataToAccessibilityNodeInfo() to avoid Out of Bounds errors when Location Length exceeds Text Length.
Specified the accessibilityService CTS tests to run for core presubmit.

Test: Should fix broken tests in AccessibilityTextActionTest
Bug: 241784682

Change-Id: I9b5fd1b2850b26815dea73080ad21aeb3d177bfe
parent ec0e6da7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -9,6 +9,9 @@
        {
          "include-filter": "com.android.internal.inputmethod"
        },
        {
          "include-filter": "android.accessibilityService.cts"
        },
        {
          "exclude-annotation": "androidx.test.filters.FlakyTest"
        }
+1 −1
Original line number Diff line number Diff line
@@ -12489,7 +12489,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            RectF[] boundingRects = new RectF[positionInfoLength];
            final CursorAnchorInfo.Builder builder = new CursorAnchorInfo.Builder();
            populateCharacterBounds(builder, positionInfoStartIndex,
                    positionInfoStartIndex + positionInfoLength,
                    Math.min(positionInfoStartIndex + positionInfoLength, length()),
                    viewportToContentHorizontalOffset(), viewportToContentVerticalOffset());
            CursorAnchorInfo cursorAnchorInfo = builder.setMatrix(null).build();
            for (int i = 0; i < positionInfoLength; i++) {