| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When user types space after a word, we receive a text
change event, but the suggestion span is not added to
the text yet. The spell checker adds the span after the
text change event is sent. Previously we send the event
in onSpanAdded in TextView, but we don't do anything or
update the before text for span removed. This is a bit
confusing and error prone. This change moves the send
event logic into spell checker.
Bug: b/143378480
Test: tested with talkback.
Change-Id: Ibd45843494304602b177df8da520a51058989f10
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the unchecked length of the current sentence is too long, the
spell checker should check the first MAX_SENTENCE_LGNTH characters of
the unchecked part. In this case, detectSentenceBOundary should return
[textChangesStart, textChangeStart + MAX_SENTENCE_LENGTH)
Fix: 188875278
Test: manual test
Change-Id: I31847aed2d564f7bc1ff43c83adae3bb7c99c0d1
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The the text is changed, we need to remove all affected SpellCheckSpan.
However, the previous check logic can not work correctly, and may
leave some out-of-date SpellCheckSpan, which causes problem when the
SpellChecker tries to apply suggestions on those spans later.
Also fixed the bug that the offset is not calculated correctly when we
validate spell checker suggestions.
Fix: 188107864
Change-Id: I8dc806d96b6a75255277d6de013305557835cb6d
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Test: atest android.widget.cts.TextViewTest
|
| |
|
|
|
|
| |
Fix: 185786752
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: Icf447fc3ab174bc17af0e823b830f5abef6071df
|
| |
|
|
|
|
|
| |
Updated test added in commit 7000b5f89d8c43af5ccd116c1840ea89dd9f17dc
Bug: 179804789
Change-Id: I48c744815662cabcbef8e823916b1e6bba9c9b17
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "Use SpellCheckerSessionParams in CTS."
Revert submission 14191185-ky-tsm
Reason for revert: breaks build test_suites_x86_64 b/185855437
Reverted Changes:
I724aaad15:Introduce SpellCheckerSessionParams.
I510a4cfec:Use SpellCheckerSessionParams in CTS.
Change-Id: I4173bd5bee62f02a248de69df77420c39326b9f0
|
| |
|
|
|
|
|
|
|
| |
SpellCheckerSessionParams encapsulates parameters for
TextServicesManager#newSpellCheckerSession().
Bug: 179804789
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I724aaad15b0a4bd38f6a24585c4c45cfeee5b499
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the SpellChecker use the start and end positions as the key
to maintain the SuggestionSpan cache.
However, the actual start/end position of the SuggestionSpan may changes
when the text is changed. Hence we may not be able to find the
corresponding SuggestonSpan for a new suggestion with the changed
start/end positions.
In this fix, we deprecated the cache and use Spanned#getSpans to find
overlapped spans instead.
Change-Id: I1e732f335ad745d85a7620e3ced6858551f18232
Fix: 182982338
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I327e5163499cfc978ff8480664a7e728b6ea7249
|
| |
|
|
|
|
|
|
|
|
|
| |
SpellCheckerSessionListener callback methods will be called on
the provided executor.
This CL also adds more description for 'bundle' parameter.
Bug: 179804789
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I43f9f04fc335ad45d2580f4711b19aee214bc7dd
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Introduces SentenceIterator into android.widget.SpellChecker and
uses it to detect the start/end of spell check range instead of
using a fixed length.
Fix: 179125303
Fix: 179124679
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: If6dd044e24dcaa58381949c221a5f9af57a4104f
|
| |
|
|
|
|
| |
Bug: 179223118
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: Ic47a6aee5fb29a9549ecd72c5a5a6aea889ad74b
|
| |
|
|
|
|
|
|
|
|
| |
- Change to trigger full content spell check when calling InputConnection#performSpellCheck.
- When calling InputConnection#performSpellCheck, forces to do spell check even user is editing the word.
Bug: 177947314
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Test: Manually test the add to dictionary case with Gboard
Change-Id: I4f7c2e638e517fe91776ef0a285ee20e4cdc9a92
|
| |
|
|
|
|
| |
Bug: 166304720
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I22f4a59a0c8ccb43f799351062f9fabca42403cd
|
| |
|
|
|
|
| |
Bug: 166304720
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I2f5796d899c79ea1cd6795c16f2011389ae7afea
|
| |
|
|
|
|
|
|
|
| |
IME can use this method to redo spell checking after it has learned a
new user dictionary word.
Bug: 166304720
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I956cd46f25bb77b7e1a6a3e1478c0d7efa1a056a
|
| |
|
|
|
|
|
|
|
|
| |
The following attributes are added for grammar suggestions.
- SuggestionSpan#FLAG_GRAMMAR_ERROR
- SuggestionsInfo#RESULT_ATTR_LOOKS_LIKE_GRAMMAR_ERROR
Bug: 166304720
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I0e5da3125d28bb881e513d0d69e0a2d336a9f286
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL introduces a unified way for framework developers to specify
whose components should be interacting with the given TextView. An
important use case is the direct-reply UI notification hosted in
System UI, which always runs as user 0 no matter who is the current
user.
For instance, to let the given EditText interact with user 10's input
methods and spell checkers, you can call setTextOperationUser() as
follows.
editText.setTextOperationUser(UserHandle.of(10));
In this way we can easily propergate the same user ID to other
components such as autofill and text classifer as necessary in the
future.
No one calls TextView#setTextOperationUser() yet hence there should be
no user-visible behavior change.
Bug: 120744418
Bug: 123043618
Test: spell checker still works
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I6d11e4d6a84570bc2991a8552349e8b216b0d139
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently when an EditText is attached to a Window, one spell checker
session will be immediately requested even when that EditText is
empty. This is not efficient, especially for notification with direct
reply.
With this CL, EditText does not request spell checker session while it
is empty. Basically this doesn't cause any user-visible behavior
change.
Bug: 109701487
Fix: 37434131
Test: Run 'adb shell dumpsys textservices' to make that a new spell
checker session is established not when a notification with
direct reply is posted but when the user actually starts
replying on that notification.
Change-Id: Iee04f4c0e2d248041d01c528344b191b9875d122
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
One of the exit conditions of the loop immediately above the code is
when a BreakIterator finishes its input and emits BreakIterator.DONE,
which we were then mistakenly then using as a parameter for setting
spans.
Bug: 12936072
Bug: 5555929
Change-Id: Ib4aba113f2e7838cd040076160c1dd0fb90adb1a
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When typing a contraction (such as "doesn't") we don't want a spell
right after the apostrophe, as this will create a false temporary red
underline, and the span split also breaks a kern pair causing text to
shift. This patch detects the case where the cursor is immediately after
such a word and suppresses correction in that case.
Bug: 17641350
Change-Id: I4d09576a31df551c96f820242fd2cbc675506dae
|
| |
|
|
|
|
|
|
|
|
| |
This CL adds a new constructor of TextService so that spell
parcelable spans can be preserved in TextInfo. The primary usage
scenario is to provide locale information for spell checker
service.
BUG: 15869548
Change-Id: Ib58ece68dee4c6187d469049fca8c35a307c7a01
|
| |
|
|
|
|
| |
Bug:13028925
Change-Id: I0a9301248b10a339afbdc5e4ffe3310ac4fa1fb7
|
| |
|
|
|
|
|
|
| |
Add check for invalid range before setting for further check
at end of parse() loop.
Bug:12936072
Change-Id: Ie0b33b8e69fe47e5d3371640be5681f13a4e4f6e
|
| |
|
|
|
|
|
|
| |
Basically, the root cause of this issue is a lack of an expected implementation.
This change completes the spec of the architecture to remove modified "SuggestionSpan"s.
Bug: 9190860
Change-Id: I63f2ccf3407ae7c1bc28813e044b8703e2112f34
|
| |
|
|
|
|
|
| |
language to non-supported language
Bug: 7658675
Change-Id: Ia2353f299506b5871e0104594e4486b6ab1ffa82
|
| |\
| |
| |
| | |
jb-dev
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug 6464190
The 'inProgress' flag is set to false when the SpellCheckSpan starts
to get used (instead of a less intuitive when it is removed).
Pool recycling in handled by onSpellCheckSpanRemoved, called from
the TextView's SpanWatcher, when a SpellCheckSpan is removed for any
reason (from the SC code or due to text editing).
The other change is that Sentence SC now correctly removes the span
from the text (and hence recycles it in the pool).
Change-Id: If8b433fd5e41d4dc0304a127ebcc088ea1eecaa7
|
| | |
| |
| |
| |
| | |
Bug: 6451163
Change-Id: If018533e8855e9dc21ab2a09ae31aa80ef260b72
|
| | |
| |
| |
| |
| | |
Bug: 6476578
Change-Id: I60ad82f80770dcb67fd9663dac64dc81634d7014
|
| |\ \
| | |
| | |
| | | |
into jb-dev
|
| | |/
| |
| |
| |
| |
| |
| |
| | |
Bug 6222722
Also fixed a cast to Long warning.
Change-Id: Ief299cc3cb952b83f774ca1be13dc69352015a3e
|
| |/
|
|
|
|
| |
Bug: 6464197
Change-Id: I6e9d359847b200e2afae61f85eb7cfe7f179b888
|
| |
|
|
|
|
| |
check doesn't start when the user changes the cursor position by touch
Change-Id: I1535eae23efc42660b9d1e6dbfba6c800b0302b2
|
| |
|
|
|
| |
Bug: 6400290
Change-Id: Ifb3b2f4034a1717369c63206611e5b6c441fded5
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Will also fix Bug 6344997
The previous TextWatcher mechanism was inneficient. It require an
expensive getSpans() call to retrieve all the spans and then search
for the one we're interested in in case it has been changed.
The SpanWatcher is faster, it will broadcast the add/changed/removed
events we're interested in.
Now that we can rely on SpanWatcher, use it to directly track
addition and removals of EasyEditSpans.
No unit test for this feature which require an integration with
the voice IME. Easy to test manually though.
Change-Id: Idabcacc48c479bf9868d5204c0b0ca709207ede2
|
| | |
| |
| |
| | |
Change-Id: I7c7659c921103d31f9909c14850088aef0d2eb19
|
| | |
| |
| |
| |
| | |
Bug: 6354647
Change-Id: I52e6c21387c7f4d6fc05b4c50bbb0a5a6c75194b
|
| |/
|
|
|
| |
Bug: 6320351
Change-Id: I0e931b7248f8c65268b60af599c07432d58d2f1f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a new version of CL 179343 which had to be reverted.
This problem of the previous CL is that the ComposingSpan that
was part of the replacement text was correctly added during the
replace but was immediately removed because it had a zero-length
size.
Swapping the add and remove blocks solves the problem.
The new non-zero length enforcement also revealed a bug in the
spell checker where we were creating useless range spans.
Change-Id: I59cebd4708af3becc7ab625ae41bc36837f1a1cf
|
| |\ |
|
| | |
| |
| |
| | |
Change-Id: Ic89b0dd027bf0af6e8f1877043ae40baed48b2a4
|
| |\| |
|
| | |
| |
| |
| | |
Change-Id: I281d031259dd220936832668e7a4556473ccb2ce
|
| |/
|
|
| |
Change-Id: Ib3c9fe7189c8f31a460149add857e9855919f386
|
| |
|
|
| |
Change-Id: Ia91f1771c0b8ef458dd5b023f4c372cc36a15657
|
| |
|
|
|
|
| |
Support sentence level spell checking APIs: Step 1
Change-Id: I31c0b88e7885f33a0694ab60b8f2dbceeffe42f1
|
| |
|
|
| |
Change-Id: I8cd9500cc50b7a484bf387e6a6a0c9b4ffb175a4
|