Commit Graph

1843 Commits (63a0bdb41bdc6dc3cd94f3354bf3bda4d057fa93)

Author SHA1 Message Date
Jean Chalard ef0ef2d0b9 am beb74610: am ab18b5f1: am 9395014e: Don\'t resume suggestions with H/W keyboard
* commit 'beb746103011149d6dfce10278475946e679263d':
  Don't resume suggestions with H/W keyboard
2014-09-08 13:52:25 +00:00
Jean Chalard 9395014e76 Don't resume suggestions with H/W keyboard
...unless we do support a hardware keyboard, which we still
do not at the moment.

Change-Id: Iec24b1ae8ba5e23e0bbb7e5a468b7404296d4b18
2014-09-08 22:14:02 +09:00
Jean Chalard 653546a618 am c3fac52d: am 1f74ba17: am cb077f75: Merge "Resolve an old TODO." into lmp-dev
* commit 'c3fac52dd51ba70db83d96b2d421bd440683d9bc':
  Resolve an old TODO.
2014-09-08 09:34:58 +00:00
Jean Chalard 6bb6d30344 Resolve an old TODO.
This is cleaner.

Bug: 17347779
Change-Id: I5b612783b1ec98a1a11401f00d68db49654f3023
2014-09-05 20:10:29 +09:00
Jean Chalard c0d3123930 Merge "[ML2] Small refactoring" 2014-09-02 06:40:51 +00:00
Jean Chalard 146cb98e54 [ML2] Small refactoring
Change-Id: I1283d666b8904ff4e6c012332bdbc9c0c13df415
2014-09-01 20:09:24 +09:00
Jatin Matani aa223400c3 StatsUtilsManager should be initiated(#onCreate) before loadSettings.
Change-Id: I9002b4afb023e55ab251ea070ec0b7a6ace99261
2014-08-29 15:51:57 -07:00
Keisuke Kuroyanagi 9eec97d5b0 Merge "Use DictionaryFacilitatorLruCache for personalization." 2014-08-29 10:10:40 +00:00
Keisuke Kuroyanagi e59f3e4fbf Use DictionaryFacilitatorLruCache for personalization.
Bug: 16547557

Change-Id: I5faba5e26d072b49c0fffcaeaf5062f9e0c2dcc0
2014-08-29 12:57:50 +09:00
Jatin Matani aabb351279 Refactor StatsUtils into two components:StatsUtils & StatsUtilsManager
Bug:16522256
Change-Id: I9cb8129c552159cf17ea5c2656e0988bf0f999f5
2014-08-28 17:28:23 -07:00
Tadashi G. Takaoka 8b5788d72b am 68a2a69a: am 37beaf15: Simplify onComputeInsets of LatinIME
* commit '68a2a69ae35352650a4c6dfc0b0c69069c4a1e1d':
  Simplify onComputeInsets of LatinIME
2014-08-27 10:44:51 +00:00
Tadashi G. Takaoka 37beaf1529 Simplify onComputeInsets of LatinIME
This CL expands SoftInputWindow to the entire screen. Thus a key
review backing view is eliminated and onComputeInsets() gets
simplified too.

Bug: 17212702
Bug: 10841052
Bug: 10541453
Change-Id: I2d859f4e4698c64cabe399000821f13bab729996
2014-08-27 19:20:38 +09:00
Ken Wakasa 6da1c674fd resolved conflicts for merge of 8159336b to master
Change-Id: I9dd726593c6768b1db35305935ee69b0937358ef
2014-08-27 18:55:39 +09:00
Ken Wakasa c1596086d3 resolved conflicts for merge of 0268f736 to master
Change-Id: Ib89ef55a8752f9b5e357eed3a05c79dd28d0ec0e
2014-08-27 18:41:31 +09:00
Yohei Yukawa 29200b0abe Set the text bgcolor only when CursorAnchorInfo is available
When CursorAnchorInfo is unavailable, we shouldn't try to show
the commit indicator and set the text highlight color.

With this CL, RichInputConnection can be used to track if the
application responded that it does support CursorAnchorInfo or
not.  This result will be taken into consideration when
InputLogic needs to determine whether the commit indicator
should be displayed or not.

Change-Id: I945d70eeb02a7a5f3d9b22459b23d7028508910f
2014-08-27 01:30:45 -07:00
Yohei Yukawa bea17c49ec Introduce commit/add-to-dictionary indicators
This CL introduces commit/add-to-dictionary indicators.

Note that the text is not yet highlighted when the commit
indicator is displayed. It will be addressed in subsequent
CLs.

Change-Id: I7e9b0fcfdc0776a50a1d8cfb41ee0add813317dd
2014-08-26 21:20:27 -07:00
Ken Wakasa 4660ecaa44 Merge "Fix a bug where mic/emoji key wouldn't work." 2014-08-26 13:30:15 +00:00
Jean Chalard e38043849e Fix a bug where mic/emoji key wouldn't work.
Bug: 17272902
Bug: 17269948
Change-Id: I561609fa84a6265f8148db7d2411bc1fd38dd163
2014-08-26 22:06:21 +09:00
Jean Chalard 96522da9eb am 2a2d324e: am 8380f921: Fix a bug where the top prediction would disappear.
* commit '2a2d324eb627807a9d09b491fbb4ac78ffb253fc':
  Fix a bug where the top prediction would disappear.
2014-08-26 12:37:17 +00:00
Jean Chalard 8380f921f7 Fix a bug where the top prediction would disappear.
This is because prediction can't be easily distinguished in
style. This fixes the bug by simulating the right members,
but some refactoring should be done to remove useless
booleans.

Bug: 17271923
Change-Id: Ib88f3fb95678021624e59535492926dd315d26fb
2014-08-26 20:35:59 +09:00
Yohei Yukawa d8dfac6dcb am abf05cc0: am fdfe73ff: Merge "Use more descriptive names for some internal fields" into lmp-dev
* commit 'abf05cc0da1ead7e270a7c99bf9f000dabf91f5b':
  Use more descriptive names for some internal fields
2014-08-25 10:16:11 +00:00
Jean Chalard 1a31d784cd Merge "Introduce onEvent() to improve testability" 2014-08-25 09:57:42 +00:00
Yohei Yukawa fdfe73ff1f Merge "Use more descriptive names for some internal fields" into lmp-dev 2014-08-25 09:50:59 +00:00
Tadashi G. Takaoka d147db8763 am c500700f: am 19dd34a0: Show view even when IME is explicitly shown with physical keyboard
* commit 'c500700faec11b7a6d54a821009be4d657c43394':
  Show view even when IME is explicitly shown with physical keyboard
2014-08-25 09:35:08 +00:00
Yohei Yukawa a61b7245b0 Use more descriptive names for some internal fields
This CL clarifies that delay parameters are specified with
milliseconds.

Change-Id: I401a60b8c09c2a04201af5b74babcdb091c07f4a
2014-08-25 02:28:01 -07:00
Jean Chalard 908f0ed154 Introduce onEvent() to improve testability
...and prepare for the future

Change-Id: Ieed96ab552993fd148e80b9c3355f1b569bd716f
2014-08-25 16:33:47 +09:00
Tadashi G. Takaoka 19dd34a023 Show view even when IME is explicitly shown with physical keyboard
Bug: 17242477
Bug: 13988700
Change-Id: I519c0481760a9aa93a5d9bee68e0f6a3a8fc4d9d
2014-08-25 16:28:44 +09:00
Jean Chalard dc44260484 Merge "Revert "Revert "[ML1] Introduce RichInputMethodSubtype""" 2014-08-25 05:24:28 +00:00
Jean Chalard 85ddfe1317 Revert "Revert "[ML1] Introduce RichInputMethodSubtype""
This reverts commit a63d0a8ee6.

This patch seems to be fine after all, but was submitted without its companion [ML1.1] patch causing a build breakage. Reverting the revert and submitting both at the same time seems like the right thing to do.

Change-Id: Ib8fefa40b74dcee0edb025a52dac9b35c82d49df
2014-08-25 04:42:15 +00:00
Jean Chalard 6c638d1bbd Merge "Revert "[ML1] Introduce RichInputMethodSubtype"" 2014-08-22 09:41:46 +00:00
Jean Chalard a63d0a8ee6 Revert "[ML1] Introduce RichInputMethodSubtype"
This reverts commit 8ffe4bc932.

Change-Id: I9d4c98b0adfdb78b0f4d376f7691e50d1bd2228f
2014-08-22 09:40:27 +00:00
Yohei Yukawa eb99b461f0 am 96db9222: am cabb66e9: follow-up to API change in I4a577bfd02b37b
* commit '96db9222c2c8c728498751221cc92664676dd4f0':
  follow-up to API change in I4a577bfd02b37b
2014-08-22 09:26:22 +00:00
Jean Chalard f429d8f138 Merge "[ML1] Introduce RichInputMethodSubtype" 2014-08-22 07:42:29 +00:00
Jean Chalard 8ffe4bc932 [ML1] Introduce RichInputMethodSubtype
Bug: 11230254
Change-Id: Ic7a1bf938a5a186dcff527b556295aba2406e8b9
2014-08-22 16:34:27 +09:00
Mohammadinamul Sheik 698b19ef35 Pass a new argument to StatsUtils.
Change-Id: I61e32c7a455a273e8daf9a5487d7969923802488
Bug: 17013677
2014-08-22 15:58:45 +09:00
Yohei Yukawa cabb66e9bc follow-up to API change in I4a577bfd02b37b
BUG: 17182367
BUG: 17185263
Change-Id: Id54ca29c191b9752fa82ffe5a960113b2e97e5c1
2014-08-21 21:39:15 -07:00
Yohei Yukawa b8337e7232 am 2834ddf1: am b9768702: Merge "Use #onStartInputInternal to initialize cursor rect retrieval" into lmp-dev
* commit '2834ddf1a0c9bea38569429f90bdf7526ba8fa22':
  Use #onStartInputInternal to initialize cursor rect retrieval
2014-08-20 15:52:48 +00:00
Yohei Yukawa 9f4f6681a9 Use #onStartInputInternal to initialize cursor rect retrieval
This CL simply moves the method calls of #requestCursorAnchorInfo
into #onStartInputInternal just to consolidate the logic.

Change-Id: Ia205738b9614e9ae375c1dab767a91d2e1f6d0d3
2014-08-21 00:21:57 +09:00
Jean Chalard 8adf5e8a70 Have the "add to dictionary" hint display the right word
Before this, we display the word we have committed instead
of the word we will actually insert into the personal dictionary.
There is a difference when the word was typed with auto-caps.

Bug: 17071785
Change-Id: I2bfec0402b1307934590a78ab5c25104d92b75ca
2014-08-18 20:43:40 +09:00
Yohei Yukawa 16a43d2bd9 Let the backing view cover the entire content area
With this CL, the backing view starts covering the content area
entirely.  This allows the IME to render its UI elements at an
arbitrary position on the screen.

Change-Id: I8b4173410931b776964dddf66de2fe247e51d9de
2014-08-16 12:28:13 +09:00
Jean Chalard b8d764772b Add the input style to SuggestedWords.
Change-Id: I81f37d08659d449822b027d3d5912e11eec8b8ff
2014-08-14 17:53:04 +09:00
Yohei Yukawa d9a8e1ccfd Enable CursorAnchorInfo callback when necessary
Change-Id: If3dda7442418053600ac935da50baaddb0e31d37
2014-08-13 20:02:14 +09:00
Yohei Yukawa 6e7806bc00 Add stub implementation of #onUpdateCursorAnchorInfo
This CL never changes existing behavior because
ProductionFlags.ENABLE_CURSOR_ANCHOR_INFO_CALLBACK is
not yet turned on.

Change-Id: I4bcbd2aebd05977b07231e8aa14acdcf6d8e1fa0
2014-08-13 19:36:23 +09:00
Tadashi G. Takaoka a696c92477 (DO NOT MERGE) Add debug setting to force hardware special key
Bug: 13988700
Change-Id: If23f8a14097431e76a303a6d6c24e8d9835fb655
(cherry picked from commit 3659c70fc3)
2014-08-13 08:04:54 +00:00
Tadashi G. Takaoka 499153734e (DO NOT MERGE) Add SpecialkeyDetector
Bug: 13988700
Change-Id: I215e879ad33b149370c1d0a5fdcf2203c0fc8b4a
(cherry picked from commit 34541bfeb6)
2014-08-12 10:14:41 +00:00
Tadashi G. Takaoka 8fdff5a111 (DO NOT MERGE) Show InputView even when hardware keyboard is connected
Bug: 13988700
Change-Id: I4aeb01bf3571afc97959c213474a6424d7896120
(cherry picked from commit 06514f00f4)
2014-08-12 10:03:47 +00:00
Keisuke Kuroyanagi e05eb21826 Rename distracter filter class.
Bug: 13142176
Bug: 15531638
Change-Id: I89cef5264073eed25ffb5be10fdff731df0a3138
2014-08-08 17:01:19 +09:00
Ken Wakasa 3316dcd453 Merge "Revert "Introduce onEvent() to improve testability"" into lmp-dev 2014-08-05 00:07:36 +00:00
Ken Wakasa f5f5fb4b64 Revert "Introduce onEvent() to improve testability"
This reverts commit ef74e737f5.

Apparently, this CL broke several unit tests.

Change-Id: I86cf5f1ffb0214707afe99ee97f92ba8c5157f3f
2014-08-06 23:57:03 +00:00
Jean Chalard ef74e737f5 Introduce onEvent() to improve testability
...and prepare for the future

Change-Id: Ieed96ab552993fd148e80b9c3355f1b569bd716f
2014-08-06 07:29:35 +00:00
Jean Chalard 1f3d89c2af Revert "[HS1] Save some data in startInputView"
This reverts commit f1accd4f04.

Bug: 16830599
Change-Id: I4c9367f742b8ee8463920e91263b05c2195f8480
2014-08-06 18:36:55 +09:00
Jean Chalard 772a8019ef Revert "[HS2] Move more stuff to onStartInput"
This reverts commit 93b00a314e.

Bug: 16830599
Change-Id: I955e7da77978c3a495660aa29247e010d489c36b
2014-08-06 18:36:29 +09:00
Jean Chalard 411fa5909b Fix an NPE when running with Keep.
Change-Id: Ie703e14bff42d34608f11d0c2d7758950b84c88c
2014-08-06 13:00:05 +09:00
Jean Chalard 93b00a314e [HS2] Move more stuff to onStartInput
Bug: 8152758
Change-Id: Ida05df7d151ceb582886e2ad06c5bdf0b59978ee
2014-08-06 11:14:47 +09:00
Jean Chalard 1b9f7c962c Merge "[HW14] Cleanup" into lmp-dev 2014-08-04 23:56:40 +00:00
Jean Chalard dd31a2dedf [HW14] Cleanup
Do away with the didAutoCorrect local variables which are
unnatural to return out of all these functions.

Change-Id: I22024004d2c489de018beff812c2c589bfd8ca32
2014-08-05 12:59:55 +09:00
Jean Chalard f1accd4f04 [HS1] Save some data in startInputView
Bug: 8152758
Change-Id: Ic57d3918b08e775769d4ba5d73ba5c31231e0d6a
2014-08-04 22:40:21 +09:00
Tadashi G. Takaoka 76cffec788 Show "navigate up" icon on settings activity
Bug: 15813742
Change-Id: I8b1feb5c35377e62199e5a909640d9c50f970654
2014-07-29 12:05:48 +09:00
Jean Chalard 036b83f4c4 Merge "Wait for an event before actually realizing it" into lmp-dev 2014-07-25 11:19:20 +00:00
Jean Chalard 3d951c1eff Wait for an event before actually realizing it
This would wrongly emit a 'timeout' log entry when switching
between two instances of the same language.

Change-Id: I56e5de121b87f3e762b58f0b2a77e9abc784036e
2014-07-28 19:33:49 +09:00
Tadashi G. Takaoka ab661e3ef8 Make "Show correction suggestions" as a binary option
Formerly "Show correction suggestions" had three options, "always
show", "show in portrait mode", and "always hide". The reason behind
"show in portrait mode" was that there may not be enough screen estate
in landscape mode to show suggestions. Because recent phone devices
have relatively large screen, we decide to remove "show in portrait
mode" option.

Bug: 15780939
Change-Id: I896d737452c3893d43ce20bd88127f10c1eb3d83
2014-07-27 14:47:07 +09:00
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
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
Ken Wakasa 0100a49bdd Merge "[HW5] Make the word composer package private." 2014-06-26 23:14:30 +00:00
Jean Chalard 28ebbd481a [HW5] Make the word composer package private.
Change-Id: I66ed277751272eb3ae2fd5e55e9f3e413970082f
2014-07-01 18:21:17 +09:00
Jean Chalard 08c01ea8a8 [HW4] Move a reference to WordComposer out of LatinIME
Change-Id: I5436432c0da86ed1e33b3c9d40204f4ea013ff55
2014-07-01 18:21:17 +09:00
Jean Chalard 350f23f67e [HW3] Some refactoring
Change-Id: I303ce084a56c6ec709d3eab239a4d9d2274d0dea
2014-07-01 18:21:17 +09:00
Jean Chalard b10ca308af Merge "[HW4] Move a reference to WordComposer out of LatinIME" 2014-06-26 23:14:58 +00:00
Jean Chalard e063e1b218 Merge "Fix a unit test" 2014-06-26 23:14:30 +00:00
Jean Chalard fa4c59f9b6 Fix a unit test
When switching languages, we need to wait until the dictionary is
loaded to compute suggestions.

Change-Id: I7c32a900b297cd6302bfdc020842581315f3007f
2014-07-01 18:19:11 +09:00
Jean Chalard 6345562e2b [SD4] Restart suggestions on language change
...otherwise we can't recompute the composition when we
change scripts.

This also fixes when we register that we need to take note
that the current subtype was used. Luckily this is a good
occasion for some cleanup that I've wanted to do for some
time: use InputTransaction for onTextInput (with the goal
to ultimately remove it entirely)

Bug: 15840116
Change-Id: Ie4f4f9157b66b79237eeb3db75535803124d3e19
2014-06-30 21:58:52 +09:00
Jean Chalard 35c37dbef8 [SD3] Forward the script ID to where it will be used
Bug: 15840116
Change-Id: If2073e76fed74ae6e1cdd7670013e0e985b0e630
2014-06-27 21:18:42 +09:00
Jean Chalard e2744c6384 Don't override application-specified completions
...for any given input.
This is not necessarily the best fix, but it's simple and
it works well enough.

Bug: 15869703
Change-Id: I54b262be8bdbec37031dea655c60a5573b3d8ec3
2014-06-27 17:31:08 +09:00
Jean Chalard 8a23703763 Merge "[CM1] Let predictions be aware of capitalize mode." 2014-06-10 22:31:57 +00:00
Jean Chalard deccc23564 [CM1] Let predictions be aware of capitalize mode.
Bug: 15554503
Change-Id: If5e8c0d94ed26d929400ccbb0d45ac23dd98d180
2014-06-16 18:44:39 +09:00
Keisuke Kuroyanagi 37c49f63df Update suggestion strip when the contextual dict is updated.
Bug: 14161647
Change-Id: Ic7d53464bd051bffc8c7f8d097325321fe0aaee7
2014-06-16 18:30:59 +09:00
Keisuke Kuroyanagi 1a4d815b0b Contextual dictionary updater.
Bug: 14161647
Change-Id: I8106419678d5d26a4debec7bbef43af079c1ab18
2014-06-13 18:39:29 +09:00
Keisuke Kuroyanagi d7a22c8439 Personalization dictionary updater.
Bug: 14161647
Change-Id: I7ab3d701525e9a19bc100aa577527e332bb2ad95
2014-06-13 16:31:12 +09:00
Tadashi G. Takaoka 6a96c508fd Fix logic to show suggestions
Bug: 15531465
Change-Id: Ic7fe5743ad3767cdaed699e5e2d1ebcaa75e22c2
2014-06-11 11:51:58 +09:00
Jean Chalard 453711abe2 Use RichInputConnection to get the previous word.
We don't need the optimization of storing the old words now
that the RichInputConnection can supply it without IPC.

Bug: 13703802
Change-Id: I37ccb8d5fba879fb04b4f23d33571849736d897c
2014-06-09 19:43:20 +09:00
Keisuke Kuroyanagi a2a4ee2765 Merge "Check isInDictionary() before the distracter test." 2014-06-09 02:53:33 +00:00
Keisuke Kuroyanagi bdf745da32 Check isInDictionary() before the distracter test.
Bug: 13142176
Bug: 15428247
Change-Id: I7ce2c09ebbef6ca8c056807c2a35f2f987fd436e
2014-06-09 11:43:45 +09:00
Tadashi G. Takaoka 987bff9136 Refactor logic to determine showing suggestions strip or not
The logic to determine when the suggestions strip (a.k.a. the
contextual strip) should be shown is already complex. In addition to
that the voice input key get shown on the strip as well. There are a
several factors to be considered and a few things to control.

- The password input field shouldn't have the strip.
- Show voice input key on the strip or not.
  - User preference settings "Show Voice Input Key".
  - A voice IME exists and is enabled.
  - The input field may have a private IME option to prevent the voice
    input key from being displayed.
- Application can specify auto completions.
  - Full screen mode or not.
- User preference settings "Show correction suggestions".
  - Always show, Show in portrait mode, Always hide.
- The input field may have flags to prevent showing suggestions or
  auto corrections.
- Suggestions is empty or not.
- An important notice may be shown.

Bug: 14981852
Bug: 15436479
Change-Id: I3050fd53ee6271fc64a8f17b6b12d9581d37b750
2014-06-06 19:41:21 +09:00
Jean Chalard 6464d73ad9 Merge "When starting input, include the literal word in suggestions" 2014-06-06 07:27:40 +00:00
Tadashi G. Takaoka bd3b20ce73 Merge "Always update voice key visibility" 2014-06-06 07:14:28 +00:00
Jean Chalard fca2c4b439 When starting input, include the literal word in suggestions
This change also includes a fix that has suggestions re-computed
when the typed word is included but no prior suggestions were
found in spans.

Bug: 2349475
Change-Id: Ic06e6ac492507126ffc1e96a5f396c971b567272
2014-06-06 16:00:18 +09:00
Jean Chalard eb771b9dc4 Merge "Fix a small bug with rotation." 2014-06-06 06:34:00 +00:00
Jean Chalard c69ba5630d Fix a small bug with rotation.
Bug: 2349475
Change-Id: Id4aa5ce56b1a545e4cb88ca1b01cf24642deade2
2014-06-06 14:06:29 +09:00
Tadashi G. Takaoka aa4b2c7127 Always update voice key visibility
Bug: 15128166
Change-Id: Ie15724c323efa3b102f6aebddc3bda210aad1727
2014-06-06 13:18:41 +09:00
Tadashi G. Takaoka 3ca65c8fd5 Remove unused supportsSwitchingToShortcutIme attribute
Change-Id: I51c5247ac925a158facb79057f704b763b903552
2014-06-06 13:11:57 +09:00
Jean Chalard 70ff0c2122 Merge "Fix a bug on rotation with selection." 2014-06-06 03:12:12 +00:00
Jean Chalard 9fd9a68d87 Fix a bug on rotation with selection.
The symptom : when text is selected and the device is rotated,
sometimes the keyboard sets the word as being composed around
the start of the selection. Upon the next rotation this ends up
with the keyboard committing some text in place of the selection.

The cause : another bug in the framework with rotation >.>
The keyboard receives a call to startInput with a wrong cursor
position, namely one that does not represent a selection. The
keyboard sets a composition according to this wrong data. When
the keyboard is rotated again, it commits the text, which takes
the place of the selection.

The solution : actually when restarting input the keyboard
realizes that the cursor position is wrong. We cancel composition
at that time.
For robustness, this change also implements two other defensive
changes : upon call to onUpdateSelection, we actually realize
that the previous values were wrong, so we also fix it at that
time, and in addition, when rotating, we finishComposingText()
instead of commitText() which is less dangerous. Implementing
this later change also allows us to let less internal variables
from InputLogic escape to LatinIME, so it's also a good change
for design.

Bug: 14140799

Change-Id: Ib10de18e53e376ac1bbc8487e13d969828483346
2014-06-06 11:18:23 +09:00
Tadashi G. Takaoka 2e32e37d5b Rename some boolean variables for readability
Change-Id: I434cf507e68349b9893ac084645986d6b3d7da91
2014-06-05 18:18:46 +09:00
Tadashi G. Takaoka 51ee5a47b8 Remove LatinImeLogger and UsabilityStudyLogUtils
This CL must be checked in together with Ie52007dc5c.

Bug: 15318007
Change-Id: Ie665f296e43b5485ae8ba7e949aa262794ee0dcc
2014-05-29 18:03:03 +09:00
Tadashi G. Takaoka bbf556e8e1 Remove researcher logger
This CL must be checked in together with I5cc76807e3.

Bug: 15318007
Change-Id: I61423c3377ddc299fb332e742d6626c2e47145bb
2014-05-29 15:10:28 +09:00
Tadashi G. Takaoka 9df51d10fa Keep showing important notice when "show correction suggestions" is off
When
 1. The important notice message is shown on the suggestions strip.
 2. And the "Show correction suggestions" settings is off.
we will keep showing the important notice message on the suggestion
strip.

Bug: 13741460
Change-Id: I411007ab1e5e6959b6cdba7a6601a84635259313
2014-05-26 14:11:41 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Keisuke Kuroyanagi f498e53933 Make DistracterFilter interface.
Bug: 13142176
Bug: 15094186
Change-Id: If94b0a155b5ea2ff6b839e7da9d12a9cc6553931
2014-05-23 18:12:37 +09:00
Keisuke Kuroyanagi 1fa3e9044f Move distracter filter to dictionary facilitator.
Bug: 13142176
Bug: 15094186
Change-Id: Ib9e42f8e25538009f3ba62cf1e034cae3f6823c7
2014-05-23 16:10:36 +09:00
Keisuke Kuroyanagi a1035be6d8 Have DictionaryFacilitator in LatinIME.
Bug: 13142176
Bug: 15094186
Change-Id: I9da67352ff2abcd289fa5885389895ced878a413
2014-05-23 09:30:55 +09:00
Keisuke Kuroyanagi a2ce9a49ac Fix NPE happening in unit tests.
Change-Id: I2fc0dba53e18883755ff77351c152a9d3534c92b
2014-05-22 21:57:07 +09:00
Keisuke Kuroyanagi 5e2c4c0297 Merge "Use enabled subtypes for Keyboard in DistracterFilter." 2014-05-22 04:50:47 +00:00
Keisuke Kuroyanagi 17f326b745 Add beginning of sentence information in PrevWordsInfo.
Bug: 14119293
Bug: 14425059
Change-Id: I65320920e840082b0b697bb621676716d0933e0c
2014-05-21 15:40:08 +09:00
Keisuke Kuroyanagi 17ae0eb7e7 Use enabled subtypes for Keyboard in DistracterFilter.
Bug: 13142176
Bug: 15094186
Change-Id: I142eeaa11f838080a4fc5a342155e5d470eab3d4
2014-05-21 14:08:39 +09:00
Keisuke Kuroyanagi 83c40a2301 Use PrevWordsInfo instead of String in Java side.
Bug: 14119293
Bug: 14425059

Change-Id: I3d5da84881a49a04550180dd9aac2c37da2ed762
2014-05-19 13:55:40 +09:00
Keisuke Kuroyanagi 23246ed18d Use dedicated DictionaryFacilitator for DistracterFilter
Bug: 15002249
Change-Id: Ic77eaa7d627d406daad7dcd15cb4884d9f647312
2014-05-17 01:18:08 +09:00
Keisuke Kuroyanagi f9377c8920 Revert "Use dedicated DictionaryFacilitator for DistracterFilter"
This reverts commit 7122fe76e3.

Change-Id: I341089864a2b58de6e0f35844a12fb632bd1eabb
2014-05-16 11:16:54 +00:00
Keisuke Kuroyanagi 7122fe76e3 Use dedicated DictionaryFacilitator for DistracterFilter
Bug: 15002249
Change-Id: I2ebf1941fb0453ea4b97c0e539f8b36e5e0262c1
2014-05-16 18:39:31 +09:00
Tadashi G. Takaoka 2ddaf9543d Remove unused auto correction led for spacebar feature
Change-Id: Ie1544bd0d28684d9b7887fddff37b224ed4f8201
2014-05-15 17:53:43 +09:00
Yohei Yukawa f0fc320b4e Merge "Simplify StatsUtils" 2014-05-15 06:35:42 +00:00
Xiaojun Bi 3686bdfcc1 Fix off-device build
This CL fixed the breakage caused by DistracterFilter.
It should be checked in together with I8f53e9481c0f

Bug: 14911612
Bug: 13142176
Change-Id: I33c3526165cea58926d10404552f1fadc385c2e5
2014-05-14 17:39:02 -07:00
Yohei Yukawa 9aa7f66a15 Simplify StatsUtils
With this CL, the implementation of StatsUtils no longer
needs to know how to read settings from the system.

Insted, the LatinIME class is now responsible for notifying
StatsUtils whenever the settings is changed.

BUG: 14324207
Change-Id: Ic3d26ec31c8d2c082d3e7487b578b323aad2f960
2014-05-15 00:11:13 +09:00
Xiaojun Bi 25ec32f635 Merge "Implement the distracter filter" 2014-05-13 23:08:40 +00:00
Xiaojun Bi ac20253806 Implement the distracter filter
Bug: 13142176

Change-Id: I85a048cdcbbad3d6020a25f900250d8d7a0fe3da
2014-05-13 15:52:14 -07:00
Jean Chalard be99616afa Create the path for specifying combining rules in the subtype
Also add the skeleton of the combining rules for Myanmar
reordering as a pilot.

Bug: 13945569
Change-Id: Iabeb6838f45f1efff482143595ce5b48543e0c43
2014-05-12 15:58:51 +09:00
Tadashi G. Takaoka 3903e0d6e8 Merge "Make AccessibleKeyboardViewProxy not singleton" 2014-05-01 03:29:30 +00:00
Tadashi G. Takaoka bca7e4e9a2 Make AccessibleKeyboardViewProxy not singleton
This CL also renames AccessibleKeyboardViewProxy and
AccessibilityEntityProvider to MainKeyboardAccessibilityDelegate and
MainKeyboardAccessibilityNodeProvider.

Change-Id: I2b0ec091a11aa8a495794d633efecb6d8b818f42
2014-05-01 12:24:54 +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
Tadashi G. Takaoka 24536580bf TalkBack correct shift state
Change-Id: I3097805c6c8b4a4ac19fbe062f763e2639eb5cbf
2014-04-30 18:46:46 +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
Keisuke Kuroyanagi 169acbf9f0 Add null check in createDistracterFilter().
Change-Id: Iff2b73081d48f32b1d3a5d5b32c9734979362c23
2014-04-25 13:36:46 -07:00
Xiaojun Bi 281dd99346 Prepare to implement distracter filter
It was implemented according to the Plan B in the
design doc:
http://go/ime-misspelling-filter

This CL is to create a DistracterFilter instance
and pass it to PersonalizationDictionarySessionRegistrar.

This patch should be checked in together with
Id633b4fd45693

Bug: 13142176
Change-Id: Ia4957e64218c9619fcf9bb91795a187617c72a2e
2014-04-25 09:13:22 -07:00
Jean Chalard 86ff9d6dda Merge "Fix a wrong parameter passed." 2014-04-17 07:39:52 +00:00
Jean Chalard 26611120c9 Fix a wrong parameter passed.
Bug: 14120001
Change-Id: I8258304bc500fe28870fb8a5c11c15d97795423c
2014-04-17 15:44:55 +09:00
Jean Chalard ba635ad30d Merge "Restart suggestions when restarting input" 2014-04-16 10:43:28 +00:00
Jean Chalard 3aba6263f0 Restart suggestions when restarting input
Bug: 6851364
Change-Id: I3052924053f37f56c9c3953051aa1b22224a2b2e
2014-04-16 17:02:08 +09:00
Jean Chalard 66e509b1d4 Fix some failing tests
Bug: 13968927
Change-Id: I7e5e075535e38bf0fa24af98ed6e2cdfd6de6556
2014-04-15 21:44:46 +09:00
Jean Chalard 1ee443d848 Merge "[IL135] Make getCurrentAutoCapsState private" 2014-04-15 02:27:52 +00:00
Jean Chalard 82d3a56b09 Merge "[IL134] Add an alternative path to getCurrentAutoCapsState" 2014-04-15 02:24:41 +00:00
Jean Chalard 2282e8520a Fix updating the shift state upon backspace
Bug: 13514349
Change-Id: If4c9db12b0ab5be676f7a2f72715f469066ee537
2014-04-14 21:28:24 +09:00
Jean Chalard f091c491ea [IL135] Make getCurrentAutoCapsState private
Bug: 8636060
Change-Id: I800aefe6fee4c14df6fe5abe21b2387c69abb8f5
2014-04-14 21:09:32 +09:00
Jean Chalard ddc163988a [IL134] Add an alternative path to getCurrentAutoCapsState
Bug: 8636060

Change-Id: I959e13d34910adad028ed6174f92029ff690eeeb
2014-04-14 21:09:32 +09:00
Tadashi G. Takaoka 30d5ed67d6 Keep ImportantNoticeDialog showing after orientation changed
Bug: 13951402
Change-Id: Ia6340d48843abca68ebadd299827cbe43516cc39
2014-04-14 15:48: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 cb05dc1d1b Merge "[IL133] Avoid calling a dangerous method from outside." 2014-04-10 09:15:13 +00: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
Yohei Yukawa c9539f42f6 Merge "Add StatsUtils for checking state" 2014-04-08 10:23:41 +00:00
Yohei Yukawa dc0f7ca167 Add StatsUtils for checking state
BUG: 11746191
Change-Id: I0218dd07dde1d09321009ea1497258fc4235a1e8
2014-04-08 19:09:49 +09:00
Jean Chalard f9516b00ec Merge "[IL132] Remove some calls that let a value escape." 2014-04-04 13:33:26 +00:00
Tadashi G. Takaoka 9b46ddc1d5 Use platform default theme for activities and dialogs
Bug: 13698528
Change-Id: Ib904c911452525e3749c0eb287434b504576db5f
2014-04-04 17:13:54 +09:00
Jean Chalard 8ab4ae4377 [IL133] Avoid calling a dangerous method from outside.
We want to remove all calls to this as it lets internal values
escape, but there is some refactoring to do to finish this.

Bug: 8636060
Change-Id: Iedba6afe4719bc0add868714a1ee5a04b7ead33e
2014-04-03 15:36:15 +09:00
Jean Chalard 9320553ab9 [IL132] Remove some calls that let a value escape.
Bug: 8636060
Change-Id: I696514934586ee71e734fd974026af8b2c866127
2014-04-03 15:36:15 +09:00
Jean Chalard a777c1c460 [IL129] Change some confusing method names.
Bug: 8636060
Change-Id: I2f55fc23d7e05b63582a3f0660b58635eae5ec59
2014-04-02 18:10:18 +09:00
Jean Chalard 6bd3723e73 [IL128] Remove passing some handlers.
Bug: 8636060
Change-Id: I088be9a7555265ca097667523defd73be4cbe37f
2014-03-27 17:51:32 +09:00
Keisuke Kuroyanagi adfb262797 Remove logic related to dictionary loading from LatinIME.
Make mSuggest final and give DictionaryFacilitator the
responsibility to manage dictionary loading state.
This can simplify the logic to decide how to deal with
additional dictionaries when loading settings or language
switching.

Bug: 13273534
Change-Id: I9f3d328272f25addfa186fbeedaaf8417455ba99
2014-03-25 15:35:20 +09:00
Jean Chalard 4df6bc0853 Merge "[CB10] Add an event for string input" 2014-03-20 11:34:16 +00:00
Jean Chalard 058a38988b [CB10] Add an event for string input
Change-Id: Ie5da6c73d4df4553067c58cd0dce9abb34534250
2014-03-20 19:47:01 +09:00