Commit Graph

170 Commits (9ebba46c775f37abeb0451602cb323fd45adf33b)

Author SHA1 Message Date
Dan Zivkovic 69c04cadc7 Race condition in cursor move.
The method WordComposer.moveCursorByAndReturnIfInsideComposingWord() iterates
through all the code points in the word that's currently being composed, and
it tries to adjust the cursor position by a given amount (left or right).
It copies the code points to a new array while processing. But the code point
count comes from a member variable. If the member variable changes while the
method is processing the copy of the code points, it can run over the length
of the code point array.

Bug 18876474.

Change-Id: Ib3a2d90a4e82b76d381efa774e6b3d6bca99c869
2015-02-27 10:29:47 -08:00
Mohammadinamul Sheik 0f7d881dc7 Move decoder specific constants to DecoderSpecificConstants.java
Change-Id: Ie4d325b3152e1e7e424b8b436e222e194e4d9da0
2015-02-05 13:27:36 -08:00
Mohammadinamul Sheik b00c054125 AOSP changes to use KeyboardLayout to support the new DictionaryFacilitator
Change-Id: Ie0c9ce805d9ad009fc9bbaac37b715aff90cd844
2015-02-04 12:50:31 -08:00
Dan Zivkovic e1758feeff Disable the Burmese keyboard.
We'll resurrect this effort in the new code base.

Bug 16900511.

Change-Id: Iae4cd27cb29cb8f991e97cffd88ed59c30d66628
2015-01-29 10:17:33 -08:00
Jean Chalard 8e235191dd Fix moving the cursor inside composition in lang w/o spaces
Also introduce the cursor move event, which we needed to do
anyway

Bug: 18827118
Change-Id: I30e994764c095b4423b874dc05d1bbedc0de592f
2014-12-22 17:47:33 +09:00
Jean Chalard 5b91b551e5 Move util classes under common
Also why did we have two copies of LocaleUtils >.>

Bug: 18108776
Change-Id: I03b4403dfd51934e66b567f2f8b87da419cfb3ab
2014-11-07 18:00:03 +09:00
Jean Chalard ecab6aff59 Remove Dict dependency on WordComposer and ProximityInfo
Bug: 18108776
Change-Id: I9b399a44241e05a7add9bb8094263aa76de37880
2014-10-29 12:27:24 +09:00
Jean Chalard 36799b2aa2 Move InputPointers and ResizableIntArray to common
Bug: 18108776
Change-Id: Ie5c0430aa41a8d6c58bf510a10173223d7dfe9fe
2014-10-29 12:09:11 +09:00
Jean Chalard 4beeb9253a Move StringUtils under common.
Bug: 18108776
Change-Id: Ia46a4102a0e86e71118ca5e641f9f531998e166b
2014-10-28 22:44:30 +09:00
Ken Wakasa 9342484e8d Move Constants.java to the latin.common package
Our intention is to have classes of latinime-common under the common
package as much as we can.

Change-Id: I76efbbbe7bebf1a4aa943715cdff64f91675e20d
2014-10-23 20:27:37 +09:00
Tadashi G. Takaoka d3a4c51324 Fix Javadoc and null analysis related warnings
This CL also adds @SuppressWarning("unused" to java-overridable package.

Bug: 18003991
Change-Id: If70527e30654384705d7a814f5efd181d9f539e1
2014-10-23 09:58:42 +09:00
Tadashi G. Takaoka 5f00fe09e9 Fix some compiler warnings
This CL fixes the following compiler warnings.

- Indirect access to static member
- Access to a non-accessible member of an enclosing type
- Parameter assignment
- Method can be static
- Local variable declaration hides another field or variable
- Value of local variable is not used
- Unused import
- Unused private member
- Unnecessary 'else' statement
- Unnecessary declaration of throw exception
- Redundant type arguments
- Missing '@Override' annotation
- Unused '@SuppressWarning' annotations

Bug: 18003991
Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
2014-10-21 19:28:37 +09:00
Jean Chalard 176ad53c6f [ML18] Make WordComposer#getAutoCorrection a word info
Bug: 11230254
Change-Id: I6ad2e7f89862fbfe7af5502961643320c782347f
2014-10-08 21:46:13 +09:00
David Faden c92c883fdf Add calls to stub for API to consume gesture data.
Bug: 17400259
Change-Id: Ib3511afffe1d14662e7dd14611f384689516e664
2014-10-03 15:01:34 +09:00
Keisuke Kuroyanagi bb0eca5705 Rename PrevWordsInfo to NgramContext.
Bug: 14425059
Change-Id: Id06a71681fa8b5e589e29fba10fe5c1cfed66984
2014-09-29 10:52:18 +09:00
Mohammadinamul Sheik 16bfac9ff4 Add StatsUtils.onAutoCorrection method.
Change-Id: I9547b6c0f082ef7c09b251a6458badb65a841229
2014-09-16 12:34:22 -07:00
Jean Chalard e0bad8e988 [HW12] Use the consumed status of the Event.
Change-Id: I1619f6132f8f71bc1291fd6a5604a5e1e3431ae2
2014-08-04 12:41:07 +09:00
Ken Wakasa 7f545a57c9 [HW7.5] Introduce the @Nonnull annotation (take 2)
Change-Id: I05512b5434810046c8b72d6bb41567b6cd8b9d6e
2014-07-30 04:13:58 +00:00
Jean Chalard 8e38b12e9c [HW7] Introduce consumed events
Change-Id: I692c35b8e701d5a84500b949884472545b1f424d
2014-07-30 11:37:19 +09:00
Jean Chalard 7196566d4f [HW6] Split processing and applying the event.
...take 2

Change-Id: I9d13b6d51e13ce2e76ae3febebfb8c310eba509d
2014-07-30 11:06:43 +09:00
Ken Wakasa 4399849dea Revert "[HW6] Split processing and applying the event."
This reverts commit 1db3d860ca.

Reverting due to a few critical bugs and unit test failures.

Change-Id: I5e2d02300320438ef9c29577ec5b0860ea91d822
2014-07-30 00:55:49 +00:00
Jean Chalard 1db3d860ca [HW6] Split processing and applying the event.
If anyone has better names for those...

Change-Id: Ia2dfc75381816bd688948647e2c50c10657b9e89
2014-07-29 17:40:48 +09:00
Tadashi G. Takaoka 2dae79b196 Rename LatinImeLogger to DebugFlags
Bug: 15318007
Change-Id: Ic0268fd12865c9a692a5e7110a9beb76cb8b6d7f
2014-07-16 18:49:00 -07: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
Jean Chalard 367c199de1 Remove mPrevWordsInfo
This member has outlived its usefulness. It's not clear now that it
makes things really faster, but it does bring a lot of complexity
that we can avoid by removing it.

Change-Id: Ifbc8094a45b56b958fe165b1930f4cc358a97721
2014-06-10 12:07:51 +09:00
Jean Chalard d660f3bec9 Fix an IOOB exception
Bug: 14602663
Change-Id: Ie2060931df911b44230d5a5ba268f687cbdd0dc8
2014-06-02 18:21:50 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Keisuke Kuroyanagi a790c5b683 Introduce EMPTY_PREV_WORDS_INFO and BEGINNING_OF_SENTENCE.
Bug: 14119293
Change-Id: I5020e5f0aa64bc3e97b3a3c2c07a60c8b765ed64
2014-05-23 23:19:33 +09: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 e507d92aa3 Use PrevWordsInfo for get/add/remove n-gram(bigram) entry.
Bug: 14119293
Bug: 14425059
Bug: 15102610
Change-Id: Ib482390f8d15b37d44a1a54e8c243a9eaec3f815
2014-05-21 11:15:38 +09:00
Ken Wakasa 4e21d3711f Revert "Use PrevWordsInfo for get/add/remove n-gram(bigram) entry."
This reverts commit ff50b39176.

Bug: 14119293
Bug: 14425059
Bug: 15102610

Change-Id: If278b4ab236e38d20d8cdc0761b0438911bd4ff9
2014-05-20 14:01:06 +00:00
Keisuke Kuroyanagi ff50b39176 Use PrevWordsInfo for get/add/remove n-gram(bigram) entry.
Bug: 14119293
Bug: 14425059

Change-Id: I12e9ba977c153b514c6591ab52940712fd0874e3
2014-05-20 13:37:04 +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 34873a66f0 Fix: StringIndexOutOfBoundsException.
Bug: 14985751
Change-Id: I9df2f737555ab02e24e0fbd231a97c1eec26bc57
2014-05-16 15:32:12 +09:00
Jean Chalard 5ce39dfa78 Fix a bug where changing languages kills the composition.
Bug: 14926896
Change-Id: Id2a06c68a51f833db4d8bbc858a232c2696afb6e
2014-05-14 20:34:32 +09: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
Xiaojun Bi 11b7076168 Fix a bug for counting code points in WordComposer.java
This bug threw an ArrayIndexOutOfBoundsException when the word length
is 49 (maxSize + 1) when calling StringUtils.copyCodePointsAndReturnCodePointCount(...)
in the same function. This bug is discovered by running SKETCH.

The intent is to count the code points from index 0 to index i (included).
The original code only counted the code points from index 0 to index (i-1).

Bug: 13969542
Change-Id: Idbf596aba2379ba552dbe580c83c42044d505aaf
2014-04-18 14:56:35 -07:00
Jean Chalard 1ef9d5938e [CB26] Remove useless variables.
This is nice for code simplicity, but it has a small adverse impact on
performance.

Bug: 13406701
Change-Id: I9316b3fe8d79b940fbd83cf1187c8c0d10b26c71
2014-04-10 18:13:35 +09:00
Jean Chalard 5f430e0189 [CB25] Refactor some array copying
Bug: 13406701
Change-Id: I09edd822f5cc2446b324d41c76d835bcff1191e6
2014-04-09 18:38:29 +09:00
Jean Chalard d52bec0069 [CB23] Merge add and deleteLast
Bug: 13406701
Change-Id: Id9a2e4144b1908ad27d78228ee19e6fc4d4d669f
2014-04-07 15:51:44 +09:00
Jean Chalard 633e4f4533 [CB22] Merge add and delete
...but this time, it works.

Bug: 13406701
Change-Id: Iaa00339a6be76413ffaeb74ff1556e15b3bb039d
2014-04-07 15:47:01 +09:00
Ken Wakasa ef0498a8cc Revert "[CB22] Merge add and delete"
This reverts commit f6bce235ae.

Seeing several new unit test failures after this CL. Reverting..

Change-Id: Ie97127550ee36dd4a07a36701e9c5118684dfbc5
2014-04-04 18:25:34 +00:00
Jean Chalard f6bce235ae [CB22] Merge add and delete
Bug: 13406701
Change-Id: Ic9e90dd226b58b5ddb9693e04259cde00916007e
2014-04-02 18:01:00 +09:00
Jean Chalard 3e160bbe6b [CB21] More refactoring
Bug: 13406701
Change-Id: I96e0a7fa2d9f4dfd8c355da4effc116bbd0f7f18
2014-04-02 18:01:00 +09:00
Jean Chalard dfaeb125eb [CB20] Some more refactoring
Bug: 13406701
Change-Id: I4502658f4f1e1997d0ac245d95e2d4a1415b1861
2014-04-02 18:00:57 +09:00
Jean Chalard 0f913ff5ba [CB19] Some refactoring
Bug: 13406701
Change-Id: Ie4d420e8cabbbd93c3eea13a80baa4d766ee61d0
2014-04-02 18:00:19 +09:00
Jean Chalard 8bb2e99aef [CB18] Move some code around
Bring next to each other two methods scheduled for a merge

Bug: 13406701
Change-Id: I335c7202cc07d8865f4ab92e4023c1d93d1f83ac
2014-04-02 17:58:33 +09:00
Jean Chalard 3285b68c97 [CB17] Remove a member.
Bug: 13406701
Change-Id: I2e271f637f6b529a4191a7adc5cdfa5af437761b
2014-04-02 17:57:36 +09:00
Jean Chalard 70d9152c7f Some cleanup
Change-Id: Ia11d656a70623168b091763ac6524750f9cca8d8
2014-03-28 15:27:00 +09:00
Jean Chalard 8e829c37df [CB14.5] Stop copying WordComposers.
This is an overdue refactoring that I have been wanted to
do forever, and that we can at last do now that suggestions
come only from instances of BinaryDictionary instances.

With this, all unit tests and regression tests are
passing again.

Bug: 13667648
Bug: 13665487
Bug: 8636060
Change-Id: Ie23a19f9b7e692edf2ee0b107ddaff2d7db564b6
2014-03-28 15:26:27 +09:00