This should make IDEs happy with appropriate source code directory
selection.
Change-Id: Ic734bd4d20aa050c688a3158b1a382ae0ac18991
(cherry picked from commit fb74ab15c1)
This CL add more compatibility wrapper methods for
CursorAnchorInfo.
This CL also adds more utility functions and types into
CompatUtils to reduce explict cast operations.
Change-Id: Id50165b552bbf28b832a6da13bf06eedcd2a190e
With this CL, InputMethodService#onUpdateCursor and
InputMethodService#onUpdateCursorAnchorInfo can be enabled
on L when ENABLE_CURSOR_ANCHOR_INFO_CALLBACK and
ENABLE_CURSOR_RECT_CALLBACK are specified, respectively.
BUG: 16382260
Change-Id: I29924128f6bd2f08cbd91cc4e82c9c4a6ecce3ff
This CL adds two convenient utility methods for
InputConnection#requestCursorAnchorInfo to encapsulate
a bit complicated parameter construction.
BUG: 16382260
Change-Id: Ib11e3bd15a4edcb602c08ff830b2fb7b34ec00da
This CL adds an compatibility library for
InputConnection#requestCursorAnchorInfo method that is supposed to
be available in L and later.
BUG: 16382260
Change-Id: I68be0c56b9fd929546e8706ccece938ae4f33339
This CL simplifies the wrapper method for
TextInfo#getCharSequence() because in the almost all cases we want
to use the result of TextInfo#getText() as the default value.
BUG: 16029304
Change-Id: I62f987aed8ca42b093255e6c0703d6120fa01299
This is a groundwork for enabling LocaleSpan support in spell
checker service. TextInfo#getCharSequence is supposed to be
available in API Level 21 and later. We need some abstraction
layer as usual.
BUG: 16029304
Change-Id: Iafbf2877db393dbd040295c21d429334e3a13a5f
This is a groundwork to attach LocaleSpan for committed text
in LatinIME.
This CL adds a utility method to ensure that a given range
of the text is coverted by at most one LocaleSpan. Of course
it could be possible to allow a substring to be coverted by
multiple LocaleSpans at the same time, but ensuring uniqueness
for LocaleSpan is supposed to be a good starting point.
BUG: 16029304
Change-Id: Ic33a7178d0df1f05d3626aeb5773ec902254703f
This is a groundwork for enabling LocaleSpan support.
LocaleSpan is available in API Level 17 and later. We need some
abstraction layer as usual.
BUG: 16029304
Change-Id: Iead1afdc540216edb1b17f91a40d9edb2e790168
This CL consolidates the initialization logic for additional
subtypes so that each additional subtypes can have predictable
subtype ID regardless of OS version.
Previously subtype IDs for additional subtypes are calculated
differently depending on the running OS version with hoping it
minimizes the risk of compatibility issues. However, it is
getting harder and harder to maintain slightly different
logic between OSes. Thus we decided to unify the logic into
that in KitKat even though it may causes some breaking changes.
Note that the actual extra values that are used to instantiate
InputMethodSubtype object are still determined on the fly
depending on the running OS version. However these actual
extra values are no longer used for the subtype ID calculation.
BUG: 16000850
Change-Id: Id3c262386a7bc7ed75966b1395a50171abe550d3
This reverts commit db21267b78.
The reverting change breaks build in unbundled jb-ub-latinimegoole branch.
Change-Id: Ia61424f5321eb97f981d22c4b08e9ea8d348f6c1
With this CL, LatinIME starts using
InputMethodManager#shouldOfferSwitchingToNextInputMethod when
available and API level is higher than 19 (KitKat).
Note that relevant settings of LatinIME will be ignored if
InputMethodManager#shouldOfferSwitchingToNextInputMethod is
considered to be available at the moment. We will revisit
here to reorganize the user visible settings before the
new global IME switching mechanism becomes publicly
available.
BUG: 12965588
Change-Id: I0188fa56cba8e983c61cef3ae3400a0e3821f718
With this CL, LatinIME starts calling
InputMethodService#setCursorAnchorMonitorMode in #onStartInput()
when ProductionFlag.USES_CURSOR_ANCHOR_MONITOR flag is explicitly
set to true.
BUG: 13891796
Change-Id: Ib2fb0c3521b61859d4cc530155ccaaee7ee16cbc
In tests, we create many instances of LatinIME, but we never
destroy them. That means we never close the dictionaries nor
the handlers.
This change calls onDestroy, which closes all dictionaries, and
adds some code to finish the handlers.
Change-Id: I942517a2a940c54256b08763f6b38f5b55809f55
This is bad for recorrection (it will ignore recorrection suggestions).
But if you think about it well, if you didn't have a main dict, then you
probably will compute the same stuff anyway. It's not useful
to make this check at all.
Bug: 12297051
Change-Id: I6d6cf4d9353b7c668c5413c67701563b243e585c
Dynamically test for the presence of main dict suggestions. This
is much more potent and more accurate than the vaguely defined
boolean.
Also, resolve a TODO and avoid creating an object uselessly.
Not directly related, but helpful with:
Bug: 8636060
Change-Id: Ib1745f77ee6d9ec7cd8bbfa5a548652ec84ec902
Bug: 6222722
Currently, the flags of the suggestion span from the Latin IME is different from the flags from Android spell checker.
Change-Id: I2f7a54ae0d63235a0b94e039109ab8b2f1311055
Also fix a typo, and increase the time allowed to load the main
dictionary to 2 secs instead of 1.
Bug: 6114326
Change-Id: I5f70b34fc4277c55977b18466253152aa98a2507