Commit Graph

166 Commits (5a289ed29345e545742bc33728d7010b5e2c1e65)

Author SHA1 Message Date
Yohei Yukawa 3f513f107e Enable InputMethodService#onUpdateCursor behind the flag
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
2014-07-20 20:56:52 +09:00
Yohei Yukawa 5696ac95ac Add two convenient utility methods for L new API
This CL adds two convenient utility methods for
InputConnection#requestCursorAnchorInfo to encapsulate
a bit complicated parameter construction.

BUG: 16382260
Change-Id: Ib11e3bd15a4edcb602c08ff830b2fb7b34ec00da
2014-07-19 23:42:37 +09:00
Yohei Yukawa 413aded600 Add a compatibility library for newly added methods in L
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
2014-07-18 08:30:12 +09:00
Tadashi G. Takaoka 5a5ee95fae Rename ProductionFlag to ProductionFlags
Change-Id: I5da2dbf8828fa0e176e7c2496392a5f561ebfe20
2014-07-16 19:26:32 -07:00
Tadashi G. Takaoka 2dae79b196 Rename LatinImeLogger to DebugFlags
Bug: 15318007
Change-Id: Ic0268fd12865c9a692a5e7110a9beb76cb8b6d7f
2014-07-16 18:49:00 -07:00
Yohei Yukawa fc137f35c8 Simplify the wrapper for TextInfo#getCharSequence
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
2014-07-09 23:52:44 +09:00
Yohei Yukawa 733ec699cd Add a compatibility utility class for TextInfo
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
2014-07-08 14:10:12 +00:00
Yohei Yukawa ece4548eb5 Ensure each character is coverted by at most one LocaleSpan
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
2014-07-07 20:13:55 +09:00
Yohei Yukawa a92fead202 Add compatibility utility class for LocaleSpan
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
2014-07-04 20:31:34 +09:00
Yohei Yukawa 3895d7f8dc Additional subtype ID should be independent of OS-version
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
2014-07-04 15:08:58 +09:00
Keisuke Kuroyanagi a6278eb9c1 Use whether it's exact match to detect distracters.
Bug: 13142176
Change-Id: Id5b7286d28897931f7bfe571be45d46ffeef4adf
2014-05-26 21:56:20 +09:00
Tadashi G. Takaoka 630a24141e Use ViewCompat support library and delete ViewCompatUtils
Change-Id: I57d60cacd86e83894294c3f64402aba8c1829872
2014-05-24 12:26:30 +09:00
Tadashi G. Takaoka 790934158d Revert "Use ViewCompat support library and delete ViewCompatUtils"
This reverts commit db21267b78.
The reverting change breaks build in unbundled jb-ub-latinimegoole branch.

Change-Id: Ia61424f5321eb97f981d22c4b08e9ea8d348f6c1
2014-05-23 18:31:43 +00:00
Tadashi G. Takaoka db21267b78 Use ViewCompat support library and delete ViewCompatUtils
Change-Id: Ifee496ff7ecaf361898444ff4127f16748d96422
2014-05-24 02:13:52 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Keisuke Kuroyanagi a9f0a96377 Merge "Handle user dict as an ExpandableBinaryDictionary." 2014-04-30 12:44:25 +00:00
Keisuke Kuroyanagi 9ed7e47539 Handle user dict as an ExpandableBinaryDictionary.
Bug: 13755213
Change-Id: I2d242a3332e9633d4e41e08c0bbfafcefd814ecd
2014-04-30 20:35:08 +09:00
Yohei Yukawa 8ba4f33709 Use shouldOfferSwitchingToNextInputMethod when available
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
2014-04-28 15:11:19 +09:00
Yohei Yukawa da498229f4 Merge "Plumbing for ProductionFlag.USES_CURSOR_ANCHOR_MONITOR" 2014-04-13 12:56:43 +00:00
Yohei Yukawa fab4ce43f8 Plumbing for ProductionFlag.USES_CURSOR_ANCHOR_MONITOR
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
2014-04-11 12:26:33 +09:00
Jean Chalard 4370ff0998 Fix some flaky tests.
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
2014-04-10 17:32:05 +09:00
Tadashi G. Takaoka 20ddd4cff5 Add InputMethodSubtypeCompatUtils.isAsciiCapable()
Change-Id: I8145f090486f6fe30ef1e992db374cfba0c31012
2014-02-17 16:08:33 +09:00
Tadashi G. Takaoka a273319c59 Add PunctuationSuggestions class
This change must be checked in together with I366c477516.

Bug: 12640318
Change-Id: I8d3864b9d9649c9e3306e82b01a6327b11281b1f
2014-02-14 14:13:39 +09:00
Tadashi G. Takaoka e4692c0050 Revert "Use ViewCompat support library"
This reverts commit e7ee4fa862.

Change-Id: I56fab60ac859289d3ed51f691cd7e2a15da01856
2014-01-27 18:14:40 +09:00
Tadashi G. Takaoka e7ee4fa862 Use ViewCompat support library
Change-Id: I4ba261752750f5087cba810045669512b430b5e0
2014-01-27 16:11:03 +09:00
Jean Chalard e22e67e37a [IL57] Don't require a main dict suggestion.
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
2014-01-16 03:22:51 +09:00
Jean Chalard 1404c1af85 [IL21] Move the workaround utils to a better place.
Bug: 8636060
Change-Id: I566f9e109ebcabe3a6a778118434ce79d02d1113
2013-12-20 16:48:54 +09:00
Jean Chalard a905fcec00 [IL16] Improve getTextWithSuggestionSpan
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
2013-12-20 15:13:48 +09:00
Satoshi Kataoka 50f9ca4acd Fix crash in AdditionalSubtypeUtils
Bug: 11136982

Change-Id: I9d022a178c47bad3566be4c0bd8ffbce0b14896d
2013-10-09 12:50:50 +09:00
Satoshi Kataoka 03e55efe03 Add a utility of isLowRamDevice
Bug: 8967766

Change-Id: Id7132d1155bb3489bdab72d613289335945808e8
2013-09-24 19:53:35 +09:00
Jean Chalard 93445b4821 Fix some warnings
Change-Id: I7290cd1fb675a1b85b9b6ac2d464c932b5bca1dd
2013-07-31 16:17:01 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00
Tadashi G. Takaoka db7d4da3e5 Clean up IntentCompatUtils a bit
Change-Id: I803aa6c2160bfa1ffe992b28e7eb6e8a320c9762
2013-05-21 15:13:23 -07:00
Jean Chalard 89fe1f5088 Add a method to work around apps broken by recorrection
Bug: 8944307
Change-Id: I8986622554f30aaf4f595099c4ab5652b75c972c
2013-05-21 07:53:31 +09:00
Jean Chalard 7058b02a9c Extract a new class for app-specific workarounds.
Bug: 8944307
Change-Id: Iaff9dd03d3d856a6bdaa2b16c4e71e95cd2b6349
2013-05-21 07:53:28 +09:00
Satoshi Kataoka dcef94165b Support ICS on the user dictionary settings
Bug: 8600958
Change-Id: I50e9228afc7b04147eb7c4734d3145abe8859a30
2013-04-26 15:48:08 +09:00
Tadashi G. Takaoka d794f5ae2a Update setup wizard icons
Bug: 8159728
Change-Id: Ia5a14a35292b43dc1eaa2d4edd65134040355149
2013-04-18 13:15:53 +09:00
Jean Chalard 1a51833828 Remove the dialog to insert words to the dictionary.
Bug: 8562529
Change-Id: Ibd853f0cb995e7fb35f8730eafcef73ead58c869
2013-04-12 15:58:50 +09:00
Jean Chalard 0cc0544a29 Merge the dictionary pack in Latin IME.
Bug: 8161354
Change-Id: I17c23f56dd3bc2f27726556bf2c5a9d5520bd172
2013-03-19 15:40:14 +09:00
Ken Wakasa a8d3d50970 Small cleanup in CompatUtils
Change-Id: I9b4a8d7eae744ba6252a6475b75240248c70a3c0
2013-03-02 17:18:18 +09:00
Tadashi G. Takaoka 1ffdaafd83 Add setup wizard launcher icon
The setup wizard icon will be hidden if the Android Keyboard is in
system image.

Bug: 8239067
Change-Id: Ib0c0c9e3a0954512c3e03e42a661cdf86eff0dca
2013-03-01 22:28:00 +09:00
Tadashi G. Takaoka 46878544ec Add preliminary setup wizard
Bug: 8159728
Change-Id: I30d9cd637fb1d2e64588550e0aa4387bc1f7e6e5
2013-02-21 09:54:02 +09:00
Tadashi G. Takaoka 298b4240f8 Separate IntentUtils from CompatUtils
Change-Id: I373ae7ad26eee44cc8e9720314f6a53b811d0021
2013-02-04 16:06:38 -08:00
Ken Wakasa b6ca354431 Small code cleanups
Multi-project commit with I249d5fbe

Change-Id: Ia28c4e970992aa1299a30e604eaa5d096655c3a5
2013-01-07 12:13:42 +09:00
Ken Wakasa e57e9fbd18 Merge "Remove AudioManagerCompatWrapper.java" 2012-12-17 02:50:18 -08:00
Ken Wakasa fbe83245c9 Clean up SuggestionSpanUtils for API level 14+
Change-Id: Iadc235524341b48e7618e9ce05907c786409e004
2012-12-17 19:41:44 +09:00
Ken Wakasa 1e6edb3e57 Remove AudioManagerCompatWrapper.java
It is actually no longer needed for API 14+

Change-Id: I379809eae881351fdf210dd8eaa5e0b5662fb59f
2012-12-17 18:27:20 +09:00
Tadashi G. Takaoka 6fbbab3b84 Enhance ImfUtils to InputMethodManagerWrapper class
Change-Id: I6ff86ee819a446dd3ed5f9c3400d23564027b020
2012-11-12 15:23:43 +09:00
Tadashi G. Takaoka bc464e2952 Replace useless CharSequence to String
Change-Id: Idc478f901185ee1b4912acc82d0cbc54fee4e991
2012-10-22 11:03:28 -07:00
Tadashi G. Takaoka c6ff7c42d9 Add SuggestedWords.isEmpty() method
Change-Id: I0fcb104a6a81aee4b99f5ee848eba7495630dc7d
2012-10-03 15:09:10 +09:00