public abstract static class SpellCheckerService.Session extends Object
Constructor and Description |
---|
Session() |
Modifier and Type | Method and Description |
---|---|
Bundle |
getBundle() |
String |
getLocale() |
void |
onCancel()
Request to abort all tasks executed in SpellChecker.
|
void |
onClose()
Request to close this session.
|
abstract void |
onCreate()
This is called after the class is initialized, at which point it knows it can call
getLocale() etc...
|
SentenceSuggestionsInfo[] |
onGetSentenceSuggestionsMultiple(TextInfo[] textInfos,
int suggestionsLimit)
Get sentence suggestions for specified texts in an array of TextInfo.
|
abstract SuggestionsInfo |
onGetSuggestions(TextInfo textInfo,
int suggestionsLimit)
Get suggestions for specified text in TextInfo.
|
SuggestionsInfo[] |
onGetSuggestionsMultiple(TextInfo[] textInfos,
int suggestionsLimit,
boolean sequentialWords)
A batch process of onGetSuggestions.
|
void |
setInternalISpellCheckerSession(android.service.textservice.SpellCheckerService.InternalISpellCheckerSession session) |
public final void setInternalISpellCheckerSession(android.service.textservice.SpellCheckerService.InternalISpellCheckerSession session)
public abstract void onCreate()
public abstract SuggestionsInfo onGetSuggestions(TextInfo textInfo, int suggestionsLimit)
textInfo
- the text metadatasuggestionsLimit
- the maximum number of suggestions to be returnedpublic SuggestionsInfo[] onGetSuggestionsMultiple(TextInfo[] textInfos, int suggestionsLimit, boolean sequentialWords)
textInfos
- an array of the text metadatasuggestionsLimit
- the maximum number of suggestions to be returnedsequentialWords
- true if textInfos can be treated as sequential words.SentenceSuggestionsInfo
returned by
onGetSuggestions(TextInfo, int)
public SentenceSuggestionsInfo[] onGetSentenceSuggestionsMultiple(TextInfo[] textInfos, int suggestionsLimit)
SentenceSuggestionsInfo
which contains suggestions for each word.
This function will run on the incoming IPC thread.
So, this is not called on the main thread,
but will be called in series on another thread.
When you override this method, make sure that suggestionsLimit is applied to suggestions
that share the same start position and length.textInfos
- an array of the text metadatasuggestionsLimit
- the maximum number of suggestions to be returnedSentenceSuggestionsInfo
returned by
onGetSuggestions(TextInfo, int)
public void onCancel()
public void onClose()
public String getLocale()
public Bundle getBundle()