Commit Graph

4414 Commits (499f8e81b36bdeb8fe23dd0f50a9e6123017493f)

Author SHA1 Message Date
Jean Chalard 4fc97c2c01 Add a note of documentation to the sample word list
Change-Id: I95f09da03457933a14b549e04575d566de97dd49
2011-12-14 15:25:31 +09:00
Jean Chalard 01bf066c68 am 8e3faff2: Merge "Decouple member logic from control flow"
* commit '8e3faff244a03aa49dfff03f2a6d982590ff605c':
  Decouple member logic from control flow
2011-12-13 06:30:56 -08:00
Jean Chalard 9d6113257c am f7d6517d: Various mini-cleanups
* commit 'f7d6517d6b1a1dd88e2142e1a15703bb839be01b':
  Various mini-cleanups
2011-12-13 06:30:55 -08:00
Jean Chalard 8e3faff244 Merge "Decouple member logic from control flow" 2011-12-13 06:28:48 -08:00
Jean Chalard 7b5bc1ff4d Decouple member logic from control flow
This place is very confusing because a member variable with
a consistent meaning is hijacked for the duration of a function
to mean something else. This is in the way of easy-to-understand
refactoring.

Change-Id: If79bc771950d6bfc0ad5f0e9c51c7ef1dbb45b66
2011-12-13 23:15:12 +09:00
Jean Chalard f7d6517d6b Various mini-cleanups
- Stop the word composer from escaping - take a page from the law
  of Demeter and only report what is actually needed.
- Fix typos in comments.
- Add a comment for a fishy processing.
- Remove a useless local variable.

Change-Id: I5fa78901cbb5483fc9683bfb7094f47244b85df6
2011-12-13 23:09:22 +09:00
Jean Chalard df963957f5 am edf4995a: Merge "Remove the input connection sidework from handleCharacter"
* commit 'edf4995a3bad3b95a2b4184d47ea4ff890d0de73':
  Remove the input connection sidework from handleCharacter
2011-12-13 05:48:31 -08:00
Ken Wakasa 09762878d0 am 5a603f3f: Merge "Reorganize LatinIME native build directory structure. Now it got NDK friendly."
* commit '5a603f3fa2221a68452939dc1e6bb8f5444f04eb':
  Reorganize LatinIME native build directory structure.  Now it got NDK friendly.
2011-12-13 05:48:30 -08:00
Jean Chalard d31eb2e5ee am 117fc93f: Move mBestWord to the word composer.
* commit '117fc93f373cb86d4120c1261f9d0562c6529fec':
  Move mBestWord to the word composer.
2011-12-13 05:48:29 -08:00
Jean Chalard 42eee3cac9 am 7e6f4daa: Merge "Tighten conditions for space-related cancelling"
* commit '7e6f4daa196f0fd88873b5b360e3fc11b97e1ef7':
  Tighten conditions for space-related cancelling
2011-12-13 05:48:27 -08:00
Jean Chalard 8a4d4de0eb am c5257508: Merge "Consolidate underlining code under one function."
* commit 'c525750835cbb1e8c2b2bdf0248babaeb8225cba':
  Consolidate underlining code under one function.
2011-12-13 05:48:26 -08:00
Tadashi G. Takaoka b84cf8787e am cfe264bf: Merge "Introduce KeyboardSet to hold related KeyboardIds"
* commit 'cfe264bfee15344282f4a2f42cfc7ee905f0eba8':
  Introduce KeyboardSet to hold related KeyboardIds
2011-12-13 05:48:26 -08:00
satok 1568fadcb7 am 3dcba427: Merge "Extract the jni library name"
* commit '3dcba4279a9e663d040330fe13b6ce3ecd0ca879':
  Extract the jni library name
2011-12-13 05:48:25 -08:00
Tadashi G. Takaoka de5a858e2c am 77ecf52a: Merge "Remove KeyboardSwitcher.updateShiftLockState method"
* commit '77ecf52a082143ef65fa2de1ca4425ec32ad8cd0':
  Remove KeyboardSwitcher.updateShiftLockState method
2011-12-13 05:48:22 -08:00
Jean Chalard a8387b1b41 am 0a2494fa: Merge "Remove a useless return"
* commit '0a2494fa5881152a9ed316409ae650353d8969fb':
  Remove a useless return
2011-12-13 05:48:22 -08:00
satok 65cb0f746a am b2632553: Merge "Use priority queue for native string buffer"
* commit 'b2632553bfcae5beb92f7366a71f15de30f44a9c':
  Use priority queue for native string buffer
2011-12-13 05:48:21 -08:00
Jean Chalard dbb3f059af am 8e404536: Merge "Simplification"
* commit '8e404536cd20a5624acf5cea0c3aae19324b0e3f':
  Simplification
2011-12-13 05:48:20 -08:00
Jean Chalard 27f1554ad5 am cf5ceccc: Merge "Refactoring"
* commit 'cf5cecccfe84b316169f01ec1bc2b92361330002':
  Refactoring
2011-12-13 05:48:19 -08:00
Jean Chalard 675dce894c am 024ee9ff: Merge changes I7888797c,I57b2232f
* commit '024ee9ff0286b760a2c5aa7c755dda7e6c37ae21':
  Refactor + small bugfix
  Refactoring
2011-12-13 05:48:18 -08:00
Tadashi G. Takaoka c635a8c3db am dc52e7c6: Remove current keyboard id variable
* commit 'dc52e7c646bafb00898c3f2ebec064a5920e58fc':
  Remove current keyboard id variable
2011-12-13 05:48:17 -08:00
Jean Chalard edf4995a3b Merge "Remove the input connection sidework from handleCharacter" 2011-12-13 04:28:30 -08:00
Ken Wakasa 5a603f3fa2 Merge "Reorganize LatinIME native build directory structure. Now it got NDK friendly." 2011-12-13 04:24:20 -08:00
Ken Wakasa d5e35acffb Reorganize LatinIME native build directory structure. Now it got NDK friendly.
Change-Id: I0f62ce8a6a4d2b6134db698f8b8d0576616e524d
2011-12-13 21:16:20 +09:00
Jean Chalard dafa7a8e15 Remove the input connection sidework from handleCharacter
Change-Id: I3d376dfda3acd8864274390de3ff5752b18456e0
2011-12-13 21:12:07 +09:00
Jean Chalard 117fc93f37 Move mBestWord to the word composer.
mBestWord has a confusing name - it's actually an auto-correction.
It's cleaner if it lives in the word composer because an
auto-correction should be tied to a specific user input, and
should be reset each time the user input changes to avoid
race conditions.

Change-Id: I718d29395bc747372067e6440e090c6a181994ae
2011-12-13 21:06:51 +09:00
Jean Chalard 7e6f4daa19 Merge "Tighten conditions for space-related cancelling" 2011-12-13 01:23:15 -08:00
Jean Chalard c525750835 Merge "Consolidate underlining code under one function." 2011-12-13 01:22:08 -08:00
Tadashi G. Takaoka cfe264bfee Merge "Introduce KeyboardSet to hold related KeyboardIds" 2011-12-13 01:12:10 -08:00
Tadashi G. Takaoka c42f285b35 Introduce KeyboardSet to hold related KeyboardIds
This change moves
  * KeyboardSwitcher.getKeyboardId to KeyboardSet.<init> and
    KeyboardSet.getKeyboardId.
  * KeyboardSwitcher.getF2KeyMode to KeyboardSet.
This is the first step to get rid of shift state from Keyboard.

Bug: 5002108
Bug: 5679585
Change-Id: I2a5a97e5e89277bc606916d45c1afbc8d105d773
2011-12-13 18:10:50 +09:00
satok 3dcba4279a Merge "Extract the jni library name" 2011-12-13 00:46:16 -08:00
Jean Chalard 77d59b0691 Consolidate underlining code under one function.
Change-Id: I4393ff1ec28a6b3118d1344dd6d82d04899dea42
2011-12-13 17:42:27 +09:00
Jean Chalard 8ad4013406 Tighten conditions for space-related cancelling
Instead of ignoring silently a found bug, throw an exception.

Change-Id: I0aa96d0cab022b6a5e7cffe8a592dcc443c3c7a8
2011-12-13 17:40:06 +09:00
Tadashi G. Takaoka 77ecf52a08 Merge "Remove KeyboardSwitcher.updateShiftLockState method" 2011-12-13 00:27:01 -08:00
satok ba526e3157 Extract the jni library name
Change-Id: Icc58ccea1178d9f35f5be0dceebab67bbb965b7f
2011-12-13 17:25:43 +09:00
Jean Chalard 0a2494fa58 Merge "Remove a useless return" 2011-12-13 00:01:25 -08:00
Tadashi G. Takaoka 34f1820396 Remove KeyboardSwitcher.updateShiftLockState method
Change-Id: I032fc50a62a573ba4258530e695c8c88467783c6
2011-12-13 16:57:23 +09:00
satok b2632553bf Merge "Use priority queue for native string buffer" 2011-12-12 23:51:46 -08:00
Jean Chalard 14cb8448df Remove a useless return
Change-Id: Iefe10e94e2d88171387351a5b6cab52e281d0f76
2011-12-13 16:48:28 +09:00
Jean Chalard 8e404536cd Merge "Simplification" 2011-12-12 23:39:12 -08:00
Jean Chalard cf5cecccfe Merge "Refactoring" 2011-12-12 23:39:00 -08:00
Jean Chalard 024ee9ff02 Merge changes I7888797c,I57b2232f
* changes:
  Refactor + small bugfix
  Refactoring
2011-12-12 23:38:17 -08:00
satok 16379df633 Use priority queue for native string buffer
+1 2
-6 2

Performance

before

==== test finished, terminate logcat =====
(0)  100.34 (0.26%)
(1)  37149.26 (95.30%)
(2)  8.43 (0.02%)
(3)  11.18 (0.03%)
(4)  9.92 (0.03%)
(5)  1330.60 (3.41%)
(6)  250.46 (0.64%)
(20) 12.41 (0.03%)
Total 38982.50 (sum of others 38872.59)

after

==== test finished, terminate logcat =====
(0)  97.65 (0.26%)
(1)  35427.43 (95.32%)
(2)  10.30 (0.03%)
(3)  8.95 (0.02%)
(4)  11.01 (0.03%)
(5)  1224.67 (3.30%)
(6)  243.76 (0.66%)
(20) 40.91 (0.11%)
Total 37167.04 (sum of others 37064.68)

Change-Id: Id4d3b88a9cdef765affc52973aeac951ecc6a8ca
2011-12-13 16:32:52 +09:00
Jean Chalard 2939063947 Simplification
Both tests have the same meaning. They should be merged.
Also, if "deleteLast()" deletes more than one char (which
never happens in the current implementation, but it's not
guaranteed), the new code is more correct.

Change-Id: I216df7cd45f4a7d76d1d5d6aa7f8d7f9a6e35ea3
2011-12-13 16:06:00 +09:00
Jean Chalard d2c69c7d12 Refactoring
If mHasUncommittedTypedChars is true, then
mWordSavedForAutoCorrectCancellation must always be null, and
spaceState must always be SPACE_STATE_NONE.
Hence, this change is supposed to be very no-op.

Change-Id: I2716f7372d996cc4dec40a4b7ac1ee7f5f4afe91
2011-12-13 16:04:11 +09:00
Jean Chalard 2245c3b5b3 Refactor + small bugfix
postUpdateShiftKeyState used to be called also when
mEnteredText is not null => this is a bugfix.
The rest does not change the logic, as posting a message can
be done anywhere within the function with no impact.

Change-Id: I7888797c0778702d64f96701e35b611a55a6a259
2011-12-13 15:59:36 +09:00
Jean Chalard a2a85d45e0 Refactoring
Change-Id: I57b2232f7fde32df5f6e1925aad1df988def34f9
2011-12-13 15:38:49 +09:00
Tadashi G. Takaoka dc52e7c646 Remove current keyboard id variable
Change-Id: Iec19af98209e1ea8ecd176d3be04d628d4b38950
2011-12-13 12:49:40 +09:00
Jean Chalard bced4cc2f2 am 34081186: Merge "Fix a bug where revert auto-correct would revert too much"
* commit '34081186f9bcfcb84fa991ccd940745dcff38cda':
  Fix a bug where revert auto-correct would revert too much
2011-12-12 04:48:03 -08:00
Jean Chalard 34081186f9 Merge "Fix a bug where revert auto-correct would revert too much" 2011-12-12 04:46:27 -08:00
Jean Chalard cc88b8c406 am 4f41cbc5: Remove a useless function call
* commit '4f41cbc588916dce64eef644e9f7b69da1618d03':
  Remove a useless function call
2011-12-12 04:29:21 -08:00