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

Commit 0e7adaff authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android Git Automerger
Browse files

am 438a3b35: Merge "Cannot move edit text cursor to first position using...

am 438a3b35: Merge "Cannot move edit text cursor to first position using character granularity." into jb-mr1-dev

* commit '438a3b35':
  Cannot move edit text cursor to first position using character granularity.
parents 718fb9f1 438a3b35
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7015,10 +7015,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        int current = getAccessibilityCursorPosition();
        if (current == ACCESSIBILITY_CURSOR_POSITION_UNDEFINED) {
            current = text.length();
            setAccessibilityCursorPosition(current);
        } else if (granularity == AccessibilityNodeInfo.MOVEMENT_GRANULARITY_CHARACTER) {
            // When traversing by character we always put the cursor after the character
            // to ease edit and have to compensate before asking the for previous segment.
            current--;
            setAccessibilityCursorPosition(current);
        }
        final int[] range = iterator.preceding(current);
        if (range == null) {