Skip to content

Commit 0e7adaf

Browse files
sganovAndroid Git Automerger
authored andcommitted
am 438a3b3: Merge "Cannot move edit text cursor to first position using character granularity." into jb-mr1-dev
* commit '438a3b35f7a6184a19919de90f733be82e21a84c': Cannot move edit text cursor to first position using character granularity.
2 parents 718fb9f + 438a3b3 commit 0e7adaf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/java/android/view/View.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7015,10 +7015,12 @@ private boolean previousAtGranularity(int granularity) {
70157015
int current = getAccessibilityCursorPosition();
70167016
if (current == ACCESSIBILITY_CURSOR_POSITION_UNDEFINED) {
70177017
current = text.length();
7018+
setAccessibilityCursorPosition(current);
70187019
} else if (granularity == AccessibilityNodeInfo.MOVEMENT_GRANULARITY_CHARACTER) {
70197020
// When traversing by character we always put the cursor after the character
70207021
// to ease edit and have to compensate before asking the for previous segment.
70217022
current--;
7023+
setAccessibilityCursorPosition(current);
70227024
}
70237025
final int[] range = iterator.preceding(current);
70247026
if (range == null) {

0 commit comments

Comments
 (0)