summaryrefslogtreecommitdiff
path: root/core/java/android/widget/SelectionActionModeHelper.java
diff options
context:
space:
mode:
authorPetar Šegina <psegina@google.com>2017-09-06 15:25:05 +0100
committerPetar Šegina <psegina@google.com>2017-09-06 15:58:38 +0100
commitb92c539232900537d5005bcf7cbc8950ff7f42d9 (patch)
treefa4b33985d3723e802aa420be3b4cccf694bab13 /core/java/android/widget/SelectionActionModeHelper.java
parentcc78299968e7f8815dba58ae975f93d1c14992e9 (diff)
Emit text direction with selection rectangle
In order to properly perform the smart select animation on right-to-left and mixed text, we need the information about the direction of the text that is present below the selection rectangle. Test: manual - verify selection still works and that the generated directions match the directions of the text on the screen Test: bit FrameworksCoreTests:android.text.LayoutTest Change-Id: I564ee2db59ab583c9bff807ad0d0dfeacaf1386f
Diffstat (limited to 'core/java/android/widget/SelectionActionModeHelper.java')
-rw-r--r--core/java/android/widget/SelectionActionModeHelper.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/SelectionActionModeHelper.java b/core/java/android/widget/SelectionActionModeHelper.java
index f1b362743f44..ba7814d896d4 100644
--- a/core/java/android/widget/SelectionActionModeHelper.java
+++ b/core/java/android/widget/SelectionActionModeHelper.java
@@ -267,7 +267,7 @@ final class SelectionActionModeHelper {
// TODO filter out invalid rectangles
// getSelection might give us overlapping and zero-dimension rectangles which will interfere
// with the Smart Select animation
- layout.getSelection(start, end, (left, top, right, bottom) ->
+ layout.getSelection(start, end, (left, top, right, bottom, textSelectionLayout) ->
result.add(new RectF(left, top, right, bottom)));
result.sort(SmartSelectSprite.RECTANGLE_COMPARATOR);