a70d4a90a029910f788c3e7f8715cf3b842b1e2b |
|
03-Jun-2015 |
Alan Viverette <alanv@google.com> |
Prevent poorly-extended ParcelableSpans from writing to parcels If a developer extends an existing ParcelableSpan and overwrites writeToParcel, TextUtils will crash when attempting to unparcel since the span type ID is not accurate. This CL makes a separate framework-private method for writeToParcel to ensure that even if a developer extends a ParcelableSpan class, they won't modify the parceling or unparceling code that's tied to the span type ID. Bug: 21274544 Change-Id: If4c3506a55999df7a3b6d87cb8d550235d7a02c6
/frameworks/base/core/java/android/text/style/SpellCheckSpan.java
|
b062e81e3a16af43db3619d721aa522c137d1aa9 |
|
27-Sep-2011 |
Gilles Debunne <debunne@google.com> |
Too many SpellCheckSpans are created. Removed the Runnable in SpellChecker, spell check is triggered at the end of updateSpellCheckSpans instead of when a new SpellCheckSpan is created. Cache the spans in updateSpellCheckSpans to limit the calls to getSpans. When typing, every new letter in a word will create a SpellCheckSpan (this is needed in case the user taps somewhere else on the screen) The SpellCheckSpans are pooled in SpellChecker to limit unnecessary new SpellCheckSpan creation. Minor optimization on test order in getSpans to avoid some calculation. Spell check is not started everytime the selection is changed (would be triggered when the insertion handle is moved). Explicitely do that only on tap. Change-Id: Ibacf80dd4ba098494e0b5ba0e58a362782fc8f71
/frameworks/base/core/java/android/text/style/SpellCheckSpan.java
|
28294cc74491885c7fe4442353026f01f5b773e8 |
|
24-Aug-2011 |
Gilles Debunne <debunne@google.com> |
Suggestions popup window is dismissed on tap outside. But now the tap is not handled at all, as it was before. To do this, the popup window is now focusable. As a result, the TextView's window loses focus. We hide the cursor to prevent a non-blinking visible cursor. We should also fake the state of the parent TextView to keep it visually focussed. SuggestionRangeSpan and SpellCheckSpan had to made Parcelable since they are recreatedi when the TextView is re-created when the popup is dismissed. Change-Id: Ic99b2c4f02c282394f214938dd19168547af4886
/frameworks/base/core/java/android/text/style/SpellCheckSpan.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/style/SpellCheckSpan.java
|