summaryrefslogtreecommitdiff
path: root/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
Commit message (Collapse)AuthorAgeFilesLines
* Create a new KeyboardLayout class to represent the layout.Mohammadinamul Sheik2015-01-301-1/+1
| | | | Change-Id: Ia08c8194f460271c831702675cfb687ab9f6678b
* Add null analysis annotations to keyboard packageTadashi G. Takaoka2014-11-271-7/+12
| | | | Change-Id: I6f020ece3c45d584d413e4265d6d3fbdf1ea8bd8
* Move Constants.java to the latin.common packageKen Wakasa2014-10-231-1/+1
| | | | | | | Our intention is to have classes of latinime-common under the common package as much as we can. Change-Id: I76efbbbe7bebf1a4aa943715cdff64f91675e20d
* Fix some compiler warningsTadashi G. Takaoka2014-10-211-1/+0
| | | | | | | | | | | | | | | | | | | | | 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
* [ML13] Fix the locale passing in ProximityInfoJean Chalard2014-10-031-18/+10
| | | | | | | | | | | | | | | | | | | The locale is used to determine additional proximity characters. This is dependent on the dictionary language, but was passed as a function of the layout, which is wrong and would have given bad suggestions in multi-lingual mode. Ideally, additional proximity characters should be inserted in the dictionary header, but for now it's a rather simple change to get it from the dictionary's locale instead of the proximity info locale. Also, that allows us to remove completely the locale parameter from proximity info, which is a much needed change. This change has zero effect on unit tests and on regression tests. Bug: 11230254 Change-Id: If95157155db7dccd1f00b8ba55ccb3600283f9e4
* Use Java 7 diamond operatorTadashi G. Takaoka2014-05-241-2/+2
| | | | Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
* Fix typo of local variable nameTadashi G. Takaoka2014-04-221-5/+6
| | | | Change-Id: I09c0aeee979e883af199f5c533d526a089064987
* Sort keys from top-left to bottom-right orderTadashi G. Takaoka2014-04-211-11/+11
| | | | Change-Id: I228748824de62e9e46fa43db200d23f41eb6d2ce
* Use unmodifiable list to return keys from KeyboardTadashi G. Takaoka2014-04-211-9/+9
| | | | Change-Id: I85a0b18d2d78632e9a9f074eda1de9225001f876
* Use unmodifiable list to return the nearest keysTadashi G. Takaoka2014-04-211-13/+21
| | | | Change-Id: Ic9084b08fa9a1f25b7f4b98c627350583c401c12
* Fix an off-by-one error.Jean Chalard2013-09-191-7/+5
| | | | | | | | | | | | | | | | | | | | These variables were meant to represent the (x,y) coordinate of the last pixel of the grid, to avoid going one pixel too far. But the last pixel of the grid, of course, has coord (width - 1, height - 1). This bug only ever happens in a rare case because to reproduce, it needs the right (resp. bottom) coordinate of the rightmost (resp. bottommost) plus the threshold plus half the grid width (resp. height) to be exactly the number of pixels of the grid, which is pretty unlikely... unless there are more tiles in the grid than pixels on the screen, in which case the grid width is 1 and this becomes likely. This fixes the fencepost error and renames the variables to clarify their meaning. Bug: 10537485 Change-Id: Iecfe2c0f29ee17776ee2cceaa4b1db722276b1f3
* Workaround for AIOOB exception in ProximityInfoSatoshi Kataoka2013-08-291-1/+3
| | | | | Bug: 10537485 Change-Id: I185f17dcb2cd9e3af17a1eafefaa487804d5cce9
* Add getters and copy constructor to Key classTadashi G. Takaoka2013-08-151-14/+16
| | | | Change-Id: I78eb96dcc26378926dc63acbfeb4828cbd44435d
* Move util classes to the latin/utils directoryKen Wakasa2013-06-241-1/+1
| | | | Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
* Optimize ProximityInfo#computeNearestNeighbors()Jean Chalard2013-06-181-17/+110
| | | | | | | | | | | This cuts the time spent in computeNearestNeigbors by a factor of 6 to 20, with an average at about 8. This method representing about 25% of the total time spent when switching keyboards, this change is a 20% improvement in layout switching time. Bug: 8689779 Change-Id: Icb465f6010b317c7156057891c3341e51a198688
* Consolidate dummy proximity info to the spell checker infoSatoshi Kataoka2013-05-081-17/+0
| | | | | | Bug: 8783170 Change-Id: I067486e5ec1ae7cdef8e2121392464ba71ee8add
* Typing double letters via a 'circle' on the key.Keisuke Kuroynagi2013-04-101-8/+10
| | | | | Bug: 8550980 Change-Id: I5e432dea0e025ccea196f80e90a6bf945488e130
* Refactor SpellCheckerProximityInfo as extending ProximityInfoTadashi G. Takaoka2013-04-021-17/+15
| | | | Change-Id: I544eec9d661796d57749dbaa2163bc1e2a891353
* Remove MAX_PROXIMITY_CHARS_SIZE_INTERNALKen Wakasa2013-01-221-10/+13
| | | | Change-Id: I18a997503de4033b5341b564145bca862a872098
* Fix Apache license commentTadashi G. Takaoka2013-01-211-8/+8
| | | | Change-Id: Ic56167f952a7f4449da366e1e81610e72c966086
* Remove MAX_WORD_LENGTH_INTERNALKen Wakasa2013-01-151-14/+12
| | | | Change-Id: Ie11ff000675601acff5fbb00e9e9f48eb32c5071
* Get rid of special keys from ProximityInfoTadashi G. Takaoka2012-12-031-30/+78
| | | | | Bug: 7601672 Change-Id: I15faa4829b98f7b4dd07013fdd58bc2c527bcd6f
* Move code point constants from Keyboard to Constants classTadashi G. Takaoka2012-10-291-3/+4
| | | | Change-Id: Iee01d4d2b916d0b584531104ac865ae6e6370a3d
* Disable touch position correction of MoreKeysKeyboardTadashi G. Takaoka2012-10-091-2/+19
| | | | Change-Id: Ieec33894a348602fd71d6fe473142b43eb2551b6
* Calculate default touch position correction data for keys on 4th rowTadashi G. Takaoka2012-09-271-15/+17
| | | | | | | | This change also disables touch position correction for Phone/Dvorak keyboard. Bug: 7243101 Change-Id: Idfcc7ad1feabbe6a81635dceba5be087401fa18b
* Fix touch position correction data passingTadashi G. Takaoka2012-09-251-9/+7
| | | | | Bug: 7225811 Change-Id: I3dcc0385ed633585d6810fdb742e0f88c2efbbd2
* Separate inner classes of keyboard package out under internal packageTadashi G. Takaoka2012-08-301-5/+6
| | | | Change-Id: Ia3969bd5ddec5aa5d81d05ad4cf676d818587922
* Rename and consolidate some constantsTadashi G. Takaoka2012-08-211-2/+3
| | | | Change-Id: I7863936cca18b28bf0117afcbcf544a5fd7f185d
* Clean up constructorsKen Wakasa2012-08-131-2/+3
| | | | | | | | | | | And, use C++ style casts and use float math functions rather than double ones to save memory space. Also, stop using FloatMath and NativeUtils as standard Math methods are faster now. See http://code.google.com/p/android/issues/detail?id=36199 and https://android-review.googlesource.com/40700 multi-project commit with I4259fb5ab8a15ac5760a7f04fc8f4c860529f04a Change-Id: I0b81cff8c91769f7559a59b9528c75a5aabb4211
* Use SparseArray<E> instead of HashMap<Integer,E>Tadashi G. Takaoka2012-06-291-5/+0
| | | | Change-Id: Id962e670ee1a5164e6c69deb84625139bf5e7974
* Remove useless copy constructor of ProximityInfoTadashi G. Takaoka2012-06-121-21/+0
| | | | Change-Id: I56b4a99f670ad38708ad83d76b93a631295e3333
* Separate state from proximity_info step1Satoshi Kataoka2012-06-071-0/+2
| | | | | | Bug: 6548943 Change-Id: I7b4fbe20615a28151a74875be43b9f4a20e0dce9
* Utilize Rect's methodTadashi G. Takaoka2012-05-311-6/+4
| | | | Change-Id: Ia3df1baae4b92eca828c53c17f68ff26b25e525c
* Make ProximityInfo copy constructor for testTadashi G. Takaoka2012-05-231-9/+37
| | | | Change-Id: I94a29784591208af1849d4941a3b4789b93782de
* Use "float" instead of "double"satok2012-05-161-1/+2
| | | | Change-Id: I93ed4d88ede4058f081dd8d634b00dfff4e96d07
* Remove the dependency to SpellCheckerProximityInfo from ProximityInfo.Ken Wakasa2012-05-111-7/+3
| | | | | | In conjunction with I596b2deb Change-Id: I42f059158ae78e1c1c807ed4d3688edbcf18c006
* Come back the proximity correction to ExpandableDictionarysatok2012-04-021-0/+25
| | | | | Bug: 6242539 Change-Id: Ic0467d54c9d85d0653812d4e127328878ef15b94
* Send correct coordinates for the spell checkerJean Chalard2012-03-231-2/+4
| | | | | | | | This results in the computation being done in native code and the correct proximity being used. Bug: 6181080 Change-Id: I08fa05c781d607e4feca2caeda353ec19c133a3d
* Make some constants more explicit.Jean Chalard2012-03-221-2/+4
| | | | | | | | This wasn't very obvious, but the actual values are critical, so make it more readable Bug: 6181080 Change-Id: I07461d2df4c796dad0cb6f5283e41a28036d023c
* Cleanup proximity related codesatok2012-03-191-31/+4
| | | | | Bug: 4343280 Change-Id: I57c0f9e20d9d8911009ea97057251a7f7a81512f
* Send key information even when the touch position correction is not triggered.satok2012-03-141-24/+24
| | | | | Bug: 4343280 Change-Id: Id24935f9f0f66ebaa799bb92537d842033427c4c
* Avoid using collection interface, using array insteadTadashi G. Takaoka2012-03-131-14/+11
| | | | Change-Id: Ie0554362b73967bfcbbab6ad19c24683066a608e
* Pass the locale to the native codesatok2012-03-131-3/+11
| | | | Change-Id: I8f73b9b33cca56b3fa44ec6259c0896be22f4a47
* Implement additional proximity characters in the native codesatok2012-03-131-3/+4
| | | | | | Bug: 4343280 Change-Id: I9bbc5cab2fef1ee80c1fe32017df811ef8af10bc
* Merge "Split Utils class to StringUtils, SubtypeUtils, and JniUtils"Tadashi G. Takaoka2012-03-081-2/+2
|\
| * Split Utils class to StringUtils, SubtypeUtils, and JniUtilsTadashi G. Takaoka2012-03-081-2/+2
| | | | | | | | Change-Id: I09e91675fe7d573dad8c933ad513b21d7e409144
* | Add functions to calculate proximity characters in the native codesatok2012-03-081-8/+13
|/ | | | | | Bug: 4343280 Change-Id: I17f8f6295b01900948b98680d0267753f33a46cf
* Refactor to suppress null worningsatok2012-03-051-27/+26
| | | | Change-Id: I4b4dc6f86d659491d8b9a74ed120092eab964345
* Rename mini keyboard to more keys keyboardTadashi G. Takaoka2012-02-081-1/+1
| | | | Change-Id: Ie4c85e8ca5a1f41a420aae5c1cd9c1cb07e237e5
* Support additional proximity characterssatok2012-02-021-9/+41
| | | | Change-Id: Ifbe0d7e4eafea1926bbce968eae4724dd5769689