History log of /frameworks/base/core/java/android/text/method/WordIterator.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f6952b83310af2fefddaa6d1f038f7709fa4a803 17-Dec-2016 Roozbeh Pournader <roozbeh@google.com> Expand characters temporarily skipped in spellchecking

An earlier patch (I4d09576a31df551c96f820242fd2cbc675506dae)
special-cased apostrophe as a character to defer spellchecking on,
since it could cause a word break which could later get removed.

This patch updates that earlier patch to include all characters that
could cause such a behavior according the Unicode word breaking
algorithm defined in UAX #29.

Bug: 17641350
Bug: 17673522
Test: manual
Change-Id: I4029e3d91dfcf96665b003f6fdd30d1208b0ac7c
/frameworks/base/core/java/android/text/method/WordIterator.java
4037d51b132a85dcfe37a95f9d2d91ad23d162fd 12-Oct-2016 Aurimas Liutikas <aurimas@google.com> Fix imports in android.text package.

This change also removes trailing whitespaces.

Test: code still compiles
Change-Id: I65f79a34288d01616808fa9cd6732ae4ef0f1377
/frameworks/base/core/java/android/text/method/WordIterator.java
b08a07165fdc9ee6df40bbce94676755461ff3e0 29-Jun-2016 Roozbeh Pournader <roozbeh@google.com> Refactor WordIterator to avoid copying to internal buffers

Previously, since the assumption was that the string is passed down
to ICU4C for the iteration to run, a window of text was copied and
maintained. But now, we can just pass an iterator to the input
CharSequence directly to ICU4J.

Bug: 21832431
Change-Id: Ife5dfdb1d90b3eda2817d4d75747b7abc34a2299
/frameworks/base/core/java/android/text/method/WordIterator.java
9dad5811d7232c85c07761dddd9ebd035524f955 29-Jun-2016 Roozbeh Pournader <roozbeh@google.com> Get failing WordIterator unit tests to pass again

WordIterator is now following the pattern in java.text.BreakIterator,
throwing an IllegalArgumentException when receiving an invalid argument.
Previously, it failed inconsistently.

Also add @SmallTest annotations to the WordIterator tests.

Bug: 29868991
Change-Id: I8158f2f419c8c4467205031655c0e62cc9ef5c1c
/frameworks/base/core/java/android/text/method/WordIterator.java
108c9604e3a418f9b0895599e3468d58869d4af8 11-Dec-2015 Roozbeh Pournader <roozbeh@google.com> Switch WordIterator's BreakIterator to ICU4J

The java.text results are different from the ICU4J's results when
non-BMP characters are present, and the ICU4J's results appear to be
more correct. See also bug 26144875.

Bug: 25993844
Change-Id: Iec2e48008b2ce2147260ed3874e90a51ecf94a35
/frameworks/base/core/java/android/text/method/WordIterator.java
e264ac392a886788ebfd1069e1d366e2b1edef72 23-Jun-2015 Mady Mellor <madym@google.com> Text selection: Fix word boundaries for languages without spaces

WordIterator's getEnd/getBeginning methods does not support the needs
for word boundary detection in text selection. Consider the words
AABB (where AA and BB are each words). If getEnd is given the offset
on the boundary between AA and BB, it would return that offset since
it is the end of AA. For text selection we always want the "next end"
if available.

This CL adds two methods to word iterator that return the next end
and previous beginning.

This CL also alters the code in Start/EndHandle to use the x value
and current / prev line positions to determine if the user is
expanding or contracting the selection.

Bug: 21305292
Change-Id: I6e7a83e53e245d71e43d78f1957f844f2ed1cdfb
/frameworks/base/core/java/android/text/method/WordIterator.java
58c9087137989da8411ffd212072f630d3fac4f3 12-May-2015 Mady Mellor <madym@google.com> Fix issue where handle is in front of word rather than end of word

Previous getWordEnd and getWordStart functions would return a boundary
rather than a word end / start boundary in some cases. This behavior is
most evident when moving between short lines -- the handle would go to
the next boundary rather than the word end on the next line (and the
start handle would go to the word end rather than the word start on
the prev line).

This CL ensures that word or punctuation boundaries are returned and moves
most of the punctuation boundary logic into WordIterator since it makes
a bit more sense there.

Bug: 21030788
Change-Id: I96c6aff7f2c213aa3c4f66ac87ca913ca16fd347
/frameworks/base/core/java/android/text/method/WordIterator.java
6c7b4ad690fe5c22c01ad79a232e567e835f676d 15-Apr-2015 Mady Mellor <madym@google.com> Consider punctuation treatment when selecting text.

This treats punctuation as "words", so groups of punctuation will be
selected together, i.e. "Hmm... yay!!!" would be treated as four words:
Hmm-...-yay-!!!

Bug: 19950062
Change-Id: Ic9514c524092734fad1abdf19a736bfa1406157b
/frameworks/base/core/java/android/text/method/WordIterator.java
653d3a27878d5358b4a91518a756f6b9b3407b07 07-Dec-2011 Gilles Debunne <debunne@google.com> Limit created string size in Spell Checker

Change-Id: I2f4e7a8b0022d76bc30199ff80c2fe637dbe03ef
/frameworks/base/core/java/android/text/method/WordIterator.java
287d6c6e12a38864d019fa7b9184206bc8a31ea1 06-Oct-2011 Gilles Debunne <debunne@google.com> Bug 5250788: LatinIME slows down as amount of Text increases

Removed unnecessary CharSequenceIterator and made the WordIterator
work on String instead of CharSequence

Submit words to the spell checker by batches.

Refactored WordIterator to make it intrinsically local.

Change-Id: Ie9e30691985a130fa55cd052005ddb22a21761cb
/frameworks/base/core/java/android/text/method/WordIterator.java
d5ea0a1bc2fae7c6084b0c5cc9b68a925a0f50f6 29-Sep-2011 Gilles Debunne <debunne@google.com> Bug 5250788: EditText gets slower has the entered text gets longer

Profiling showed that the bottle neck was in the word iterator.
Now initializing the word iteerator to only a window around the region
of interest to reduce the text analysis.

Change-Id: Ibfa4952cbf52a1b36726f965143ac7a6dc63673e
/frameworks/base/core/java/android/text/method/WordIterator.java
6435a56a8c02de98befcc8cd743b2b638cffb327 05-Aug-2011 Gilles Debunne <debunne@google.com> Spell checking in TextViews

New UX interactions (the Paste action is no longer displayed after a delay)
suggestionEnabled flag replaced by existing input type flag.
removeSpans fixed in SpannableStringBuilder to always send notifications
SuggestionSpan handled by TextView instead of SpannableStringBuilder

New span update algorithm to correctly handle edition around word boundaries.

Change-Id: I52c01172f19e595fa512e285a565a3fd97c3c50e
/frameworks/base/core/java/android/text/method/WordIterator.java
d4bb0b01c6caccbaef1baec377a59c10790da35c 28-May-2011 Gilles Debunne <debunne@google.com> Fix for bug 4499752 - Detect nulled layouts in HandleViews

Change-Id: I6a7289150bf461cdf4cca0aff4aa4a0400e0d553
/frameworks/base/core/java/android/text/method/WordIterator.java
e193fd14346e6e808c6c266d2bb13c0c0cc6890e 18-Apr-2011 Gilles Debunne <debunne@google.com> Extracted WordIterator class.

This class will be used by TextView and the IMEs to cut the
text into words.

New getBeginning and getEnd methods that return word limits.

Added Locale to constructor.

Change-Id: Ie8ad590ebca4b48517ec7b4c3768b3e41879166e
/frameworks/base/core/java/android/text/method/WordIterator.java