Commit Graph

2548 Commits (2783c51e6d4163c8d3f8b8c114b5d170d0b645fb)

Author SHA1 Message Date
Tadashi G. Takaoka 31c94cea82 Use ObjectAnimator
Bug: 6187069
Change-Id: I7df18b470b7e746da601fab3311fb4b086f40d41
2012-03-22 12:44:46 +09:00
Kurt Partridge 19b8a73efa Merge "log through group level abstractions" 2012-03-21 20:30:35 -07:00
Kurt Partridge fdd68f0657 log through group level abstractions
For the groups:
- LogGroup.MOTION subfields now deteremined in Utils.writeMotionEvent() rather
  than in LatinKeyboardView.processMotionEvent()
- LogGroup.KEY is now logged throguh LatinIME.onCodeInput() rather than
  Utils.push().  This catches keys more generally, including modifiers, and
  records touch positions for everything.  Removed now-redundant
  Utils.writeBackspace() and Utils.writeChar().
- LogGroup.CORRECTION uses Utils.writeCorrection(), and formats instead of
  leaving this to callers.
- LogGroup.STATE_CHANGE uses Utils.writeStateChange().  Optional fields are
  still left to callers, as this group has more variety.

Formats have changed to incorporate new fields.

Minor housekeeping:

ENABLE_USABILITY_STUDY_LOG constants replaced with variable references, as
the logging feature can be changed in Settings and therefore dynamically
changes.

New log format:

20120322-111203.621+0900        1332382323621   s       [onStartInputView]      com.socialnmobile.dictapps.notepad.color.note   2131624043      147457  1140850694
20120322-111204.912+0900        1332382324912   m       [Down]  2782355 0       243     171     0.5666667       0.895
20120322-111204.975+0900        1332382324975   m       [Move]  2782419 0       240     171     0.6     1.17
20120322-111204.983+0900        1332382324983   m       [Move]  2782428 0       238     171     0.6     1.1899999
20120322-111204.992+0900        1332382324992   m       [Move]  2782437 0       236     171     0.6     1.1899999
20120322-111205.002+0900        1332382325002   m       [Move]  2782446 0       232     170     0.6     1.1899999
20120322-111205.012+0900        1332382325012   m       [Move]  2782456 0       227     169     0.6     1.125
20120322-111205.021+0900        1332382325021   m       [Move]  2782465 0       224     168     0.6     1.125
20120322-111205.031+0900        1332382325031   m       [Move]  2782475 0       221     167     0.6     0.895
20120322-111205.040+0900        1332382325040   m       [Move]  2782483 0       213     164     0.6     0.58
20120322-111205.047+0900        1332382325047   m       [Up]    2782491 0       213     164     0.6     0.58
20120322-111205.052+0900        1332382325052   k       'D'     243     171
20120322-111205.228+0900        1332382325228   m       [Down]  2782622 0       171     71      0.6333334       1.275
20120322-111205.243+0900        1332382325243   m       [Move]  2782677 0       178     69      0.6333334       1.275
20120322-111205.325+0900        1332382325325   m       [Up]    2782750 0       178     69      0.6333334       1.275
20120322-111205.333+0900        1332382325333   k       'e'     171     71
20120322-111205.509+0900        1332382325509   m       [Down]  2782936 0       265     139     0.53333336      0.885
20120322-111205.512+0900        1332382325512   m       [Move]  2782954 0       265     141     0.53333336      1.04
20120322-111205.552+0900        1332382325552   m       [Move]  2782973 0       265     143     0.5666667       1.14
20120322-111205.663+0900        1332382325663   m       [Up]    2783102 0       265     143     0.5666667       1.14
20120322-111205.668+0900        1332382325668   k       'f'     265     139
20120322-111206.140+0900        1332382326140   m       [Down]  2783584 0       348     352     0.53333336      0.675
20120322-111206.206+0900        1332382326206   m       [Move]  2783648 0       348     354     0.5666667       0.73499995
20120322-111206.223+0900        1332382326223   m       [Move]  2783666 0       348     356     0.5666667       0.545
20120322-111206.232+0900        1332382326232   m       [Up]    2783674 0       348     356     0.5666667       0.545
20120322-111206.236+0900        1332382326236   k       ' '     348     352
20120322-111206.245+0900        1332382326245   c       [----]  Def             -1

Bug: 6188932
Change-Id: Iea46a0c683f858b72005b8e81191ef1d70262dca
2012-03-22 12:02:10 +09:00
Ken Wakasa 2aa02b84a4 Revive the Makefile for makedict
Follow up to I4d2ef504.  Address a compiler warning and a small optimization as well.

bug: 6188977
bug: 6209651
Change-Id: Ibc9da51d48ebf0b8815ad0bb2f697242970ba8f7
2012-03-22 11:55:18 +09:00
Tom Ouyang 7ac556216d Merge "Move makedict to LatinIME android keyboard." 2012-03-21 05:50:28 -07:00
Kurt Partridge 221dd3d183 Merge "Add additional structure to output logs to group entries by optional fields." 2012-03-21 05:50:01 -07:00
Tadashi G. Takaoka 4897df803d Merge "Refactor key drawing code in KeyboardView" 2012-03-21 04:31:55 -07:00
Tadashi G. Takaoka 72913f97ed Refactor key drawing code in KeyboardView
Change-Id: Ic7af05caee32eb6cba68d27ba4e2d9072472b34d
2012-03-21 20:29:51 +09:00
Tadashi G. Takaoka 4cc44f9f77 Merge "Refactor to memorize device dependent override parameters" 2012-03-21 04:26:39 -07:00
Kurt Partridge 78bf41b89c Add additional structure to output logs to group entries by optional fields.
The new format has time, time as int, and the new logGroup code
    (m=motionEvent, k=key, s=statechange, c=correction)
    followed by additional text whose format depends on the logGroup code.

The additional text will be cleaned up in later CL's.

20120321-170548.067+0900        1332317148067   m
[Down]143116235,0,691,378,0.40000004,0.435
20120321-170548.133+0900        1332317148133   m
[Up]143116302,0,691,378,0.40000004,0.435
20120321-170548.146+0900        1332317148146   k       <enter> 691     378
20120321-170602.485+0900        1332317162485   s
[onStartInputView]com.socialnmobile.dictapps.notepad.color.note,2131624043,147457,1140850694
20120321-170606.508+0900        1332317166508   m
[Down]143134679,0,40,154,0.4666667,0.64
20120321-170606.567+0900        1332317166567   m
[Move]143134723,0,42,154,0.4666667,0.765
20120321-170606.577+0900        1332317166577   m
[Move]143134746,0,44,154,0.4666667,0.775
20120321-170606.652+0900        1332317166652   m
[Up]143134824,0,44,154,0.4666667,0.775
20120321-170606.662+0900        1332317166662   k       A       40      154
20120321-170607.200+0900        1332317167200   m
[Down]143135372,0,411,390,0.53333336,0.585
20120321-170607.311+0900        1332317167311   m
[Up]143135483,0,411,390,0.53333336,0.585
20120321-170607.313+0900        1332317167313   c       [----]A

Bug: 6188932
Change-Id: I8694eb9016d8cf0389ef582f6c7d2820aa4d2c92
2012-03-21 19:41:10 +09:00
Tom Ouyang e276c2401e Move makedict to LatinIME android keyboard.
Bug: 6188977
Change-Id: I4d2ef504bb983abbda3cb52ee450cb46f58d95cf
2012-03-21 19:30:26 +09:00
Tadashi G. Takaoka 624f1bab39 Refactor to memorize device dependent override parameters
Change-Id: I79482a8ef3846525669979a30dec183ea18138b5
2012-03-21 18:20:18 +09:00
Jean Chalard 32aac4777f Merge "Correctly close the gzip stream" 2012-03-21 01:32:07 -07:00
Jean Chalard bc89f5d3a5 Correctly close the gzip stream
I had gotten the chain call in reverse.
Bug: 6177523

Change-Id: Ic5b76425de2d5d05d5132f8d2c7ade0d79c14ccc
2012-03-21 17:28:37 +09:00
Jean Chalard f5f53c2fa6 Merge "Strengthen java code against bad returns from native" 2012-03-21 00:54:25 -07:00
Jean Chalard 6ca3ac08ed Strengthen java code against bad returns from native
This doesn't really fix the following bug but it may alleviate
the symptoms

Bug: 6191885
Change-Id: I0de3f550cc7c6cdf79b291399785ad31b205d2ac
2012-03-21 16:40:26 +09:00
Kurt Partridge 140467b8b6 Updated logger to record touch position within backspace key events.
Bug: 6188932
Change-Id: Ida2aff618153792f9803f30f1251d67c89af1fe0
2012-03-20 23:29:34 +09:00
satok 1fe943aabd Merge "Cleanup proximity related code" 2012-03-19 02:40:25 -07:00
satok 728d1c884e Cleanup proximity related code
Bug: 4343280
Change-Id: I57c0f9e20d9d8911009ea97057251a7f7a81512f
2012-03-19 18:33:59 +09:00
satok 546b8275ab Merge "Add a dummy file and package for make dict" 2012-03-19 02:01:05 -07:00
Kurt Partridge 6d7e0a876b Merge "Fix TAG name" 2012-03-19 00:52:44 -07:00
Kurt Partridge 9a50777890 Fix TAG name
Change-Id: Ibea065bc72e6b5e40cfa3ffa2fb6bcdeb107ffc4
2012-03-19 16:11:17 +09:00
satok 905670bd87 Add a dummy file and package for make dict
Change-Id: I195fd42f2a773bcc6fab0a61336a1c15d97902bb
2012-03-19 15:26:13 +09:00
satok f9c2773b09 Merge "Make the primary character stable" 2012-03-18 22:01:50 -07:00
satok d6d0f6976c Make the primary character stable
Bug: 4343280
Change-Id: I3e6eaa3803dc32a837825f3a64403430721b6192
2012-03-19 12:49:16 +09:00
Jean Chalard 9ffb94fa13 Rename the user history dictionary.
UserBigramDictionary -> UserHistoryDictionary.

Also update all methods, strings and comments, except those needed
for backward compatibility (which only include the name of the
database file).

Change-Id: I0bccea29880dc566b90100575b83baaa947b03ae
2012-03-19 12:03:51 +09:00
Ken Wakasa 660776e09b Small performance improvement by removing interface accesses.
Change-Id: I6d91f3b086470b79306dbe2874db9748b9e0eb5f
2012-03-17 01:53:51 +09:00
satok cbb5053b6c Fix NPE
bug: 6181736

Change-Id: I6522f19555c27f33c9ff4eaa8b2559a51a38f015
2012-03-17 01:37:53 +09:00
satok a50a34f8b4 Merge "Calculate proximity characters in the native code" 2012-03-16 01:38:07 -07:00
satok 1caff47ecd Calculate proximity characters in the native code
Bug: 4343280

Change-Id: I6adaf560f7a4f1f96dcb6ec2f61f20ee3001167e
2012-03-16 17:26:36 +09:00
Jean Chalard d0d25ac8ec Merge "Remove UserUnigramDictionary." 2012-03-16 01:11:52 -07:00
Jean Chalard f73efa9077 Merge "Move the UserUnigramDictionary functionality over" 2012-03-16 01:05:10 -07:00
Jean Chalard 7dcbed04d9 Remove UserUnigramDictionary.
This isn't used any more.

Change-Id: Ie63ae621bcac9342b869b9f236f35bf66ec3a09b
2012-03-16 17:04:41 +09:00
Jean Chalard c68d1bbfaf Move the UserUnigramDictionary functionality over
UserBigramDictionary now assumes both functionalities. It will
be renamed to UserHistoryDictionary in a future change.

There are several reasons to do this. First, there is a lot of
duplicate code in User{Unigram,Bigram}Dictionaries that are
factored by the few lines of code in this change. Also, other
dictionaries like BinaryDictionary or ContactsDictionary all
assume both responsibilities, as should be the case
theoretically.

It is also possible to do this because previous versions don't
write any unigram data that we'd want to reuse. For even older
versions that do write data, we can't really make any sense out
of it. Bigram data however can be useful, and this allows us to
reuse it easily.

Change-Id: I755525f92744e1536eaef097527e8151b7859a30
2012-03-16 17:01:57 +09:00
Tadashi G. Takaoka 9945f36406 Merge "Don't reset animation alpha value when keyboard is set" 2012-03-15 21:12:49 -07:00
satok c59e383977 Merge "Do not change the proximity orders" 2012-03-15 21:09:46 -07:00
satok ef08daddea Do not change the proximity orders
Bug: 4343280
Change-Id: I4e2dfb00d9c843a8a285d409ac5ab8fca5fb1694
2012-03-16 12:54:17 +09:00
Jean Chalard c24f66e180 Streamline some user history dictionary code
A lot of things don't really make sense in the old code.
Let's streamline it for now so that we have a cleaner interface
to work with. This is preliminary work for bug 4192129.

Change-Id: If01a5974cfadc43afced610c57fcf7fde67c1346
2012-03-16 12:22:39 +09:00
Tadashi G. Takaoka b9720a55b4 Don't reset animation alpha value when keyboard is set
The keys' blinking that mentioned in the bug is caused by switching
keyboard layout resets the animation's alpha value to opaque but the
animation is still running and changing the alpha value
asynchronously.

I think that switching keyboard layout between alphabet and symbols
doesn't imply that the user stops typing. So the keyboard view should
continue typing state timer to keep animations' alpha values changing
and never reset the value.

Bug: 6174273
Change-Id: Id795feaf44750358f30c1b3dc8e783a7e62aefe8
2012-03-16 10:08:48 +09:00
Tadashi G. Takaoka 5bee1b00c8 Merge "Remove touch dead zone" 2012-03-15 05:16:56 -07:00
Tadashi G. Takaoka 723aaa2eeb Remove touch dead zone
KeyDetector should use the distance from the hit box to detect the
key.

Bug: 6174250
Change-Id: Id1745d90222d1d1a10467f194b45307c12449944
2012-03-15 20:16:43 +09:00
Jean Chalard 3fe263fac6 Extract an annoying method call
Change-Id: I78f22bb38222fea54a55e460fcf728bf941d15e9
2012-03-15 19:30:15 +09:00
Jean Chalard 6ec1209a33 Fix a bug where quotes and dashes are considered letters
Bug: 6174065
Change-Id: I702760d44ead0eeb60d06360aa3bb03c2ec73325
2012-03-15 18:18:52 +09:00
Jean Chalard 2be7a37acf Small cleanup
Exit-fast, update comment, make a method private

Change-Id: Id103bf03aeef43a1a4d064ecabb819490dc5d39a
2012-03-15 15:54:25 +09:00
Jean Chalard 7c5f2bbd2a Remove useless code
I tracked all the calls to the constructor, and the passed
list is never null. It's also final, so it's safe.

Change-Id: I320f907acee0b237bb286a9a183c18106809174a
2012-03-15 15:10:07 +09:00
Jean Chalard 042557b45b De-duplicate a method
Change-Id: Ia1c80eeff00a55573bb311f07e1275da23bdcf98
2012-03-15 15:04:29 +09:00
Jean Chalard e8ddfe4273 Remove useless code
Change-Id: I58de87c1ba4cd1130419191f63ff83b685604356
2012-03-15 14:51:22 +09:00
Jean Chalard 4e74658883 Optimization
All calls to this methods are made with an actual String. No sense
beating ourselves with an interface stick.

Change-Id: I6ef98286be6f81f73864b04f3a17e68f36a6e542
2012-03-15 14:48:47 +09:00
Jean Chalard 123407261c Stop meaningless explicit null passing
Change-Id: I6950897d262f610d502b7f8293b9dd8d2b53e6e8
2012-03-15 14:37:40 +09:00
Jean Chalard 3187ba5dfe Remove a now-useless flag.
This has been moved to the SuggestedWords object and is now
represented by a single flag instead of a flag in each suggestion.

Change-Id: I6e9a7cff5a7701de7e61b4de13baac25c9a87b1b
2012-03-15 14:21:02 +09:00
Jean Chalard 4f6cf258fe Use the unique flag in SuggestionsView
Also, the first word in a sugestions list can never be
obsolete.

Change-Id: Ib21439aac8db4e6ce5b15b7a2aabe4222bc354db
2012-03-15 14:11:41 +09:00
Jean Chalard 03a3517075 Add info for obsolete suggestions in SuggestedWords
Change-Id: I9684c7b08244b34853ce8a99b6e9d885389f6687
2012-03-15 13:12:08 +09:00
Jean Chalard 5f9593593e Remove useless stuff
Change-Id: I43dae30774c40a9d6e7396f8fa73ed4b82a7c777
2012-03-15 12:47:05 +09:00
Jean Chalard ca3e7cbdf4 Move a computation closer to where it's used.
Change-Id: I5aee4c36ceaacbb1dbfc47c011f1e4aec4b9dca6
2012-03-15 12:23:16 +09:00
Jean Chalard eb5ffdac90 Merge "Some readability improvement" 2012-03-14 18:47:32 -07:00
Jean Chalard c787db51ed Merge "Cut out a private method to make things more readable" 2012-03-14 18:47:26 -07:00
Jean Chalard b9a5cb77f0 Merge "Minor optimization" 2012-03-14 18:47:21 -07:00
Jean Chalard 53d57ad6d3 Merge "Some code simplification" 2012-03-14 18:47:16 -07:00
satok 05c54ffc7f Merge "Really pass the y - touch correction to the native code" 2012-03-14 06:47:19 -07:00
satok 853d9020ed Really pass the y - touch correction to the native code
Bug: 4343280

Test:  I11f8518d9ee

Change-Id: I4b90bdffffed9736af223ac83c1a54019add70bb
2012-03-14 21:54:52 +09:00
Tadashi G. Takaoka 6bc9186457 Disabled key should respond if it is in the altCodeWhileTyping state
Bug: 6128215
Change-Id: I81e9980f8ffa5c5eaba30676c8433f542645de1d
2012-03-14 20:17:42 +09:00
Tadashi G. Takaoka 3848ca6729 Merge "Gray out "alt-code-while-typing" key icon while typing" 2012-03-14 03:36:56 -07:00
Tadashi G. Takaoka 73a46bfeb7 Gray out "alt-code-while-typing" key icon while typing
Bug: 6128215
Change-Id: Ie9c13d9d38aad6e92cc465e22f3ef20c80e0a36a
2012-03-14 19:36:24 +09:00
Tadashi G. Takaoka b8c471af47 Merge "Fix SuggestedWords.toString" 2012-03-14 03:28:22 -07:00
Tadashi G. Takaoka ea51bfd8a8 Fix SuggestedWords.toString
Change-Id: Ide3f605ce40e8c230f217bbf37ab016457ee91f1
2012-03-14 19:23:15 +09:00
satok 2d5c40d873 Send key information even when the touch position correction is not triggered.
Bug: 4343280
Change-Id: Id24935f9f0f66ebaa799bb92537d842033427c4c
2012-03-14 19:01:08 +09:00
Tadashi G. Takaoka 02e70cf999 Merge "Use HashSet to hold keys in Keyboard" 2012-03-14 02:54:21 -07:00
Tadashi G. Takaoka a5f7969f5b Use HashSet to hold keys in Keyboard
This partially reverts Ie0554362.

Change-Id: I0de971c5efb4e8eb093be2a0793a08bd79baee22
2012-03-14 18:51:01 +09:00
Jean Chalard 271e5b6cb7 Some readability improvement
In-place replacements of visibly identical things.

Change-Id: I02b51bd7f63597e3428f0650b239e9a39ef5a7c7
2012-03-14 18:50:08 +09:00
Jean Chalard 0d0f182959 Cut out a private method to make things more readable
Change-Id: I791700890338e023bd86b8794dbc90379b91dc7d
2012-03-14 18:43:32 +09:00
Jean Chalard ac5e463402 Minor optimization
We know the size in advance, this may save a few allocations

Change-Id: I2fb9a725f34ba2da4f34ed335652f10447d5d166
2012-03-14 18:35:07 +09:00
Jean Chalard def4551c2a Some code simplification
Just write the same thing in a more succint manner

Change-Id: I08a2c5edd52a3502914541061fd5b6ee7a92ebc4
2012-03-14 18:33:57 +09:00
Jean Chalard 4a08b2f0e4 Cleanup & optimization
Renaming some variables, and obvious optimizations.

Change-Id: Ib716748e9f3d602cf276dcd4e73f3bcfb819585e
2012-03-14 18:29:06 +09:00
Jean Chalard f985efe39c Remove a useless parameter
Change-Id: I03005240238fb004c20b2df0d836796e2e8b307f
2012-03-14 18:12:12 +09:00
Jean Chalard bdf6d1b18b Remove a useless method
Change-Id: I208dd2e725e37c2fb3cd51fe48194679e5912f6b
2012-03-14 15:59:04 +09:00
Jean Chalard eda7d8af60 Remove the Builder
Change-Id: Idef22e6a82d59e3ec95b95ad237debcb07daf000
2012-03-14 15:42:26 +09:00
Jean Chalard 33cc825374 Match the constructor of SuggestedWords to the Builder call.
We have to match one way or another, and the argument order to the
Builder call is more logical.

Change-Id: Iac7c3a351c2687cb294d6a4924fd9cb20ca95177
2012-03-14 15:42:22 +09:00
Jean Chalard 7d55c891af Make the Builder private
Change-Id: I2184084f4b7729c4324f8291d548bd4c4c2872a1
2012-03-14 15:42:14 +09:00
Jean Chalard 5b0643f50d Re-sequence the last calls to build()
Change-Id: If77ee5aa9483d3ca03c52812f31665dee6468e99
2012-03-14 14:19:24 +09:00
Jean Chalard d42b0238f9 Merge "Move up the static methods of the Builder" 2012-03-13 21:22:22 -07:00
Jean Chalard 7d384c73da Merge "Kill the last place where the Builder was being used" 2012-03-13 21:22:03 -07:00
Jean Chalard 88bf1ba526 Move up the static methods of the Builder
Change-Id: Ic3e07b745b7b24cae0f772ea49e0de615b44caf9
2012-03-14 13:10:22 +09:00
Jean Chalard 8e19b1183e Kill the last place where the Builder was being used
I had missed that one

Change-Id: I9a5040a7a61e294396aa424de96a69dbb15f037a
2012-03-14 13:10:12 +09:00
Tadashi G. Takaoka f147da0436 Merge "Use XML animator definition" 2012-03-13 21:10:08 -07:00
Tadashi G. Takaoka d7c4ba1709 Use XML animator definition
Change-Id: Ic2f6d3f8fdd2c0b0a00f004f49f95b00d474ee4b
2012-03-14 13:08:27 +09:00
Jean Chalard 7b2d6a8f98 Merge "Make the Builder fully immutable at last" 2012-03-13 20:30:16 -07:00
Jean Chalard 76e3861981 Merge "Straighten out the last bastion of the Builder" 2012-03-13 20:23:16 -07:00
Jean Chalard febf9929ca Merge "Add to SuggestedWords a missing parameter, and use it." 2012-03-13 20:15:34 -07:00
Tadashi G. Takaoka 82793f2f85 Merge "Avoid using interface member, use concrete collection class instead" 2012-03-13 06:25:39 -07:00
Tadashi G. Takaoka ce96959518 Avoid using interface member, use concrete collection class instead
Change-Id: I8b647e8c260aec58c557ce07f3a2d8987c24d7be
2012-03-13 22:20:34 +09:00
Tadashi G. Takaoka 0bd4699f9c Merge "Update other alt keys' graphics" 2012-03-13 06:19:53 -07:00
Tadashi G. Takaoka faad353fea Update other alt keys' graphics
Change-Id: I12699907a514f5fc2e110a0a711fb91c14a8756f
2012-03-13 22:12:40 +09:00
Tadashi G. Takaoka e1a91d0b26 Merge "Avoid using collection interface, using array instead" 2012-03-13 05:19:47 -07:00
Tadashi G. Takaoka b4fbbe57f5 Avoid using collection interface, using array instead
Change-Id: Ie0554362b73967bfcbbab6ad19c24683066a608e
2012-03-13 20:53:15 +09:00
Jean Chalard e3afb7d192 Make the Builder fully immutable at last
Change-Id: Ie399ca7a9e76ccab44a92bc378d11f92392fed2c
2012-03-13 20:33:13 +09:00
Jean Chalard 6ffb5018c1 Straighten out the last bastion of the Builder
...and go for the kill

Change-Id: I5ad57211b250d2578ca22a5dae93344d52f9da80
2012-03-13 20:26:47 +09:00
Jean Chalard ec471c72f8 Add to SuggestedWords a missing parameter, and use it.
Also stop using Builder between its creation and the call to
the #build() method.

Change-Id: Ie1fc3ec7b6f4c7c3789f672f4e26b4bf58c3e062
2012-03-13 20:19:21 +09:00
Jean Chalard 2e2519ee91 Make still more members of the Builder final.
Change-Id: Ic455f97247da5e40d4939555ab639ecffef36e2d
2012-03-13 20:05:00 +09:00
Tadashi G. Takaoka edf5daa8ed Merge "Support invalidating multiple keys in KeyboardView" 2012-03-13 04:00:15 -07:00
Jean Chalard bd4ba23d2b Some code reorganization.
Use the same local variable inside both branches of an if.

Change-Id: I61f7d506d984f3723ec90604416d1875dd97cd8c
2012-03-13 19:54:56 +09:00
Jean Chalard b5eeb724fc Make some more Builder attributes final.
Change-Id: I3132b7fe4ee97c566736bfc21c3783cfc79fc7ff
2012-03-13 19:53:38 +09:00
Jean Chalard c60fea852d Make the suggested word list final in Builder.
Change-Id: I2ddfab00dc8c141fc989a051f16eb2b3571b7e86
2012-03-13 19:37:17 +09:00
Jean Chalard 08adb09e14 Remove unused stuff.
Remove 2 methods that were left only for tests to compile in
another project, but are not used any more now that the tests
have been updated.
Also remove an attribute that is never read.

Change-Id: Ic9ba1f52a465199c82c923d77ed7450460e8a4b9
2012-03-13 19:37:16 +09:00
Jean Chalard 9ffaae71d9 Merge "Make an add into a set." 2012-03-13 03:35:17 -07:00
satok 728fd52b63 Merge "Pass the locale to the native code" 2012-03-13 03:27:11 -07:00
satok 7ef1dabd92 Pass the locale to the native code
Change-Id: I8f73b9b33cca56b3fa44ec6259c0896be22f4a47
2012-03-13 19:16:33 +09:00
Jean Chalard 674ffcdf93 Make an add into a set.
This method now only sets words, so it should be named set.
The functionality is identical since there are no more places
where the list is reused.
This will also allow to make the list final in an upcoming change.

Change-Id: I25b0c7d7f13c3fa5d89806f01f48f1026769603f
2012-03-13 19:07:42 +09:00
Tadashi G. Takaoka 299ac263b3 Support invalidating multiple keys in KeyboardView
Change-Id: I347ccfc2cf60c17f5f0eddec6566662cb3a954ca
2012-03-13 18:55:05 +09:00
Jean Chalard d6662ecd30 Cleanup
Remove an unused method, make others static, fix a formatting
issue

Change-Id: I40cb0b5e01a6f8e2f7b953bd9aad3168dfee71d1
2012-03-13 18:34:19 +09:00
Jean Chalard 4ee186920e Remove a method that causes annoying side-effects.
...and replace by a call to a central method.

Change-Id: I93d0a2c2e99963a5b69923d1062d0e01853216b6
2012-03-13 18:22:49 +09:00
Jean Chalard b8753eb31c Merge "Kill the StringBuilderPool." 2012-03-13 02:14:37 -07:00
Jean Chalard adf218eed5 Kill the StringBuilderPool.
The intention may have been nice originally but these end up
being copied anyway :/
Let's remove them now, and in a later change, just keep
references to the created objects.

Change-Id: Ifba8357c20384f9eb40cd916665ed1fc6dc8cab1
2012-03-13 17:59:49 +09:00
satok 8e08bfb8de Merge "Implement additional proximity characters in the native code Bug: 4343280" 2012-03-13 01:41:46 -07:00
satok 552c3c27f0 Implement additional proximity characters in the native code
Bug: 4343280

Change-Id: I9bbc5cab2fef1ee80c1fe32017df811ef8af10bc
2012-03-13 17:38:50 +09:00
Tadashi G. Takaoka aee5f03d6e Use integer alpha value instead of factor for animation
Change-Id: I3099a7625e0176a1d2be42e58d6eb5fa95797bcb
2012-03-13 16:47:45 +09:00
Jean Chalard 95fcb0cce9 Merge "Remove a useless parameter." 2012-03-13 00:26:06 -07:00
Tadashi G. Takaoka dabf96896e Move language on spacebar parameters to LatinKeyboardView attributes
Change-Id: I06e5d7d158a9b14b00df34e68b12cd012faf17d1
2012-03-13 16:17:13 +09:00
Jean Chalard d0d4074392 Remove a useless parameter.
Change-Id: I7625bf17158c207ad7e8cd496bef825704173c4c
2012-03-13 15:34:06 +09:00
Tadashi G. Takaoka 6fbcd0d219 Merge "Use Animator to draw language name on spacebar" 2012-03-12 22:57:57 -07:00
Tadashi G. Takaoka 4c0c638a18 Use Animator to draw language name on spacebar
Note that Animator class exists in framework only on Honeycomb or
later.

Change-Id: Ie3392dbf8acc1547ebb2d16e04086c911d961aed
2012-03-13 14:25:57 +09:00
Jean Chalard 7c9bff96f0 Kill methods with side-effects, take 2
...working this time

Change-Id: I80e377e6250d3817f1e067a551bca2a557740764
2012-03-13 14:18:30 +09:00
Jean Chalard b26af7eae7 Revert "Kill methods with side-effects"
This reverts commit ca0e048688
2012-03-12 19:42:29 -07:00
Jean Chalard ca0e048688 Kill methods with side-effects
Change-Id: I42baeec68eb2540e7d8f8538ae2dceeef5594391
2012-03-12 19:48:32 +09:00
Jean Chalard f62d6f50f2 Merge "Consolidate words into SuggestedWordInfo" 2012-03-12 03:14:54 -07:00
Jean Chalard c3c4ed91cf Consolidate words into SuggestedWordInfo
We can't get rid of SuggestedWordInfo because it conveys
the information about whether a suggestion is outdated or
not. It is always created anyway. So it makes sense not
to have separate lists and to just keep everything in the
SuggestedWordInfo object.

Change-Id: Idd79dc267d97633901d3d2869da457736963e178
2012-03-12 18:58:20 +09:00
Tadashi G. Takaoka 546692daac Merge "Support disableAdditionalMoreKeys and disableKeyLabelHint" 2012-03-12 01:48:05 -07:00
Tadashi G. Takaoka b03529aa01 Support disableAdditionalMoreKeys and disableKeyLabelHint
Change-Id: Idfa586417acd4a223380d52f044e3a86eb780b21
2012-03-12 17:45:57 +09:00
Jean Chalard a3f2ce1f31 Merge "Fix an OOB" 2012-03-12 01:12:40 -07:00
Jean Chalard c0c20b386f Fix an OOB
The combination of I6b0262fe which removes the internal
size() > 1 test in the safety net calculation and I642a5893
which assumed DBG means there is at least one suggestion.
This change writes the test correctly.

Change-Id: Ib63bce4e163a785f408dd145c23d64cd58fa8c90
2012-03-12 16:50:58 +09:00
Tadashi G. Takaoka b6895aec05 Merge "Rename keyboard XML files" 2012-03-12 00:42:03 -07:00
Tadashi G. Takaoka 47141f7011 Rename keyboard XML files
* Slavic to East Slavic
* Serbian to South Slavic
* Scandinavian to Nordic

Bug: 6150183
Change-Id: I8f5641aa07b83cbb225f5fd73e351a6f8abe0784
2012-03-12 16:39:29 +09:00
Jean Chalard 30936116d8 Merge "Make a method accessible for tests" 2012-03-12 00:23:29 -07:00
Jean Chalard 9dedec7c29 Make a method accessible for tests
Tests are using a wrapper method that's going to disappear soon.
The method that becomes package-visible now is destined to be
removed too a little later.

Change-Id: If99b1c77ed52e050b47216cc7afab5f35c4bbb38
2012-03-12 16:11:16 +09:00
Jean Chalard 1dfef0336d Make a method static
Change-Id: Ie1d460562d38105abe91ae2da17cafd49e2cd394
2012-03-12 15:00:36 +09:00
Ken Wakasa c1ca8815f5 Fix an obvious bug in handleLanguageSwitchKey()
bug: 5759092

Change-Id: I8c7b2ef024cbab399d96f6b3ec553da4e9d2fb18
2012-03-11 00:44:47 +09:00
Jean Chalard 1a85b74adb Entirely remove safety net memory.
mHasAutoCorrectionCandidate now includes the fact that this
did not get caught by the safety net. This is more intuitive.

Change-Id: I6502bbf1ca64a0a6d64f55d723305cf78352a656
2012-03-09 22:10:25 +09:00
Jean Chalard 68823ae08e Make the safety net memory private
Change-Id: I10959d47c980d2e8f2ea995955acf02193e3ff7b
2012-03-09 22:01:15 +09:00
Jean Chalard ebbb7e9665 Recompute safety net in debug cases instead of memorizing
Change-Id: I67f3a31db081afa4871ec441dd461c56e098c668
2012-03-09 22:00:23 +09:00
Jean Chalard 682c2d53cc Make access to the safety net calculation easier
Change-Id: If33897b38af94ae81b05e5ef140a542724b9f34a
2012-03-09 21:44:40 +09:00
Jean Chalard 151d5cb532 Extract a condition from a method
Change-Id: I6b0262fe7cb3f7a31cc19d724c301467be932640
2012-03-09 21:37:44 +09:00
Jean Chalard 36c1b37914 Remove a useless argument
Change-Id: I713433a3225193489fad5bdafcf302b529903116
2012-03-09 21:24:47 +09:00
Jean Chalard 28e59b98c6 Remove a useless escape
Change-Id: I1ef0685cc9888c9cef9f60015d32b66dde75ef9b
2012-03-09 21:10:55 +09:00
Jean Chalard d5f618e90a Remove a useless test
If we are not composing a word here, we have already returned

Change-Id: I63281abace777e3658286d4df6781d2cd5a29c33
2012-03-09 20:53:45 +09:00
Jean Chalard c5d2bb786e Don't use an intermediate object with a different meaning
Change-Id: Ie89916b49c852a51385ffd61cb596a58f23a46a0
2012-03-09 20:51:33 +09:00
Jean Chalard ed9986824e Move some auto-correction logic to where it belongs
Change-Id: I897c5ec3a630a4a6bfc593906df4d3fc7b244482
2012-03-09 20:45:37 +09:00
Jean Chalard dfd4abe818 Fix a shameful bug
I must have been sleeping when I wrote that

Change-Id: I887180ab610785a2000636adeeed99230b3c5390
2012-03-09 19:31:35 +09:00
Jean Chalard 0cf422fbb7 Reduction, step 8
Change-Id: I54334039597e235e24f169e34c1d44109180ee88
2012-03-09 19:00:29 +09:00
Jean Chalard a333ff19ef Reduction, step 7
Change-Id: I177ef2f29c8b6000c5e3d021c016c5d216fe3fc6
2012-03-09 18:59:20 +09:00
Jean Chalard a3ee019331 Reduction, step 6
Change-Id: I22ad4cea0e0cac23813da7e788f5c94974ce0ebf
2012-03-09 18:58:01 +09:00
Jean Chalard dbd140504d Reduction, step 5
Change-Id: Iac52e62c2bdffad14f916f69eade2b785bb41767
2012-03-09 18:44:23 +09:00
Jean Chalard 0b96bc4b2b Reduction, step 4
Change-Id: Ib27dc6e9486c3f0f2ec1e94a88a52d12c1af2d38
2012-03-09 18:44:20 +09:00
Jean Chalard 5a61d03f31 Reduction, step 3
Change-Id: I0e08b102c9539d97c473505b9d42176c4a7c8853
2012-03-09 18:44:16 +09:00
Jean Chalard 8abd15b59f Reduction, step 2
Change-Id: I06e117df43d25dbaf9fc7a7366efd9355a6215ce
2012-03-09 18:44:10 +09:00
Jean Chalard f08f30176b Reduction, step 1
Change-Id: Ic3ed04300cfd4c0b69b93b27379aca4093b32f67
2012-03-09 18:38:44 +09:00
Jean Chalard de165aed2a Separate bigram prediction from suggestion process
Change-Id: Ibdef206fbd6688a45cebbd7fb8a9f6cd175d03b0
2012-03-09 18:38:20 +09:00
Jean Chalard 6f722c8301 Remove useless stuff
Change-Id: I462d24da2d26661990d6aab2a13fde851763fd61
2012-03-09 18:36:52 +09:00
Jean Chalard 67af2a2415 Export some more logic out of Latin IME
Change-Id: Ib264533a05e9e09347bf254789e6ab5beec92400
2012-03-09 18:36:49 +09:00
Jean Chalard df9fce5df1 Export some logic out of LatinIME
Hopefully that will end in Suggest/SuggestedWords being autonomous
and won't need the logic spoon-fed to them

Change-Id: I915661bce13c69c8a5b8e5d4a8c41e18fea594cf
2012-03-09 18:36:45 +09:00
Jean Chalard 91e55ac000 Small optimization
We only use some of those results in one branch of an if() test.
Let's not compute those that are not needed.

Change-Id: I6ca068646b86d2980fb88e75b110ad077362c4ff
2012-03-09 16:47:43 +09:00
Jean Chalard 195419b1ec Small reorganization
...resulting in a slight optimization

Change-Id: I83a9b8c92c3d93ce75988285997ec138b3ffe52e
2012-03-09 16:41:35 +09:00
Jean Chalard 838629aea0 Remove useless test
typedWord may not be null here

Change-Id: I9e7afb89fafbf6fcbc91fbc132aecc06aec8979f
2012-03-09 15:52:23 +09:00
Jean Chalard d48b76267a Merge "Remove a useless test (B7)" 2012-03-08 22:26:20 -08:00
Jean Chalard 2d82757fc6 Merge "Rename a parameter (B6)" 2012-03-08 22:23:33 -08:00
Jean Chalard de19ab878d Merge "Remove useless tests (B5)" 2012-03-08 22:22:56 -08:00
Jean Chalard 5a7cb9305a Merge "Remove a provably useless test (B4)" 2012-03-08 22:22:20 -08:00
Jean Chalard 54392438c5 Merge "Optimize and clean up (B2)" 2012-03-08 22:00:02 -08:00
Jean Chalard 90bd4efd10 Remove a useless test (B7)
consideredWord is provably never null.

Change-Id: Ifaa0d2471c46f14967e70ad004d2b82f841a4566
2012-03-09 14:55:46 +09:00
Jean Chalard cf8bc92ba0 Rename a parameter (B6)
This is not necessarily the typed word. Actually, the parameter
that's passed here has trailing single quotes culled out of it.

Change-Id: Ia2038faa2cbbd3a5b8263e6c0fb5b8e670993fe9
2012-03-09 14:52:35 +09:00
Jean Chalard 92146f2926 Remove useless tests (B5)
WordComposer#getTypedWord() may not return null. Don't test for it.

Change-Id: I6aff14892503d0c275a3328c404ed99d2f40a687
2012-03-09 14:52:04 +09:00
Jean Chalard 31a5da28e3 Merge "Move some code around (B1)" 2012-03-08 21:15:25 -08:00
Jean Chalard 8cd847c2fa Remove a provably useless test (B4)
If !mInputAttributes.mInputTypeNoAutoCorrect then mCorrectionMode
will not have allowed #hasAutoCorrection() to return true.

Change-Id: I1b498d5aeb26194c765cc9b9dcb24d980de43894
2012-03-09 12:56:48 +09:00
Jean Chalard 94b20c90d8 Optimize and clean up (B2)
Stop parameters from escaping and don't do useless work and
simplify the code.
Yay.

Change-Id: I0dfc3e14b1cb50e0730f6d9c1d52b54516baa90e
2012-03-09 12:51:55 +09:00
Jean Chalard dc5dfe37e0 Move some code around (B1)
The goal is to make the creation of the Builder closer to
the #build() call

Change-Id: I48d76d4efdc180479829016582edd9de47e7332c
2012-03-09 12:33:23 +09:00
Jean Chalard 13fb8fb775 Limit escape of parameters
Change-Id: I3a7ab069042d5542ab2e033d1eeb13d718cd7698
2012-03-09 12:30:23 +09:00
Jean Chalard 23a5e9d1a7 Merge "Make AutoCorrection static and non-instantiable (A5)" 2012-03-08 19:05:30 -08:00
Jean Chalard 2621fe2256 Merge "Move a memory in the container class (A4)" 2012-03-08 19:04:56 -08:00
Jean Chalard 427dfe37ec Merge "Remove an unused method" 2012-03-08 18:31:26 -08:00
Jean Chalard cbbfa15765 Merge "Make AutoCorrection a step closer to being static (A3)" 2012-03-08 18:30:19 -08:00
Jean Chalard 58722d83f0 Merge "Stop uselessly remembering a value (A2)" 2012-03-08 18:30:10 -08:00
Jean Chalard caae6df0ce Remove an unused method
Who would have guessed this wasn't being called at all.

Change-Id: Ib74a212356ea44e9bf149619ed5464c14684a1ba
2012-03-09 11:10:55 +09:00
Jean Chalard 21af2f40c5 Merge broadcast receivers again
It's probably simpler not to have registers dance around,
and just message the feedback manager when the audio event
happens.

Change-Id: Id0710ed102d10d01f1af93ad8cb660653bb3a9f8
2012-03-09 11:00:23 +09:00
Jean Chalard 7b77c683d7 Fix a crash
Bug: 6137076
Change-Id: I05f9f72a2678d10d3400dab5fc71544276739dcf
2012-03-09 10:29:51 +09:00
Jean Chalard 39286f98bc Merge "Remove useless stuff (A1)" 2012-03-08 04:02:46 -08:00
Tadashi G. Takaoka f686211183 Merge "Split Utils class to StringUtils, SubtypeUtils, and JniUtils" 2012-03-08 03:59:59 -08:00
Jean Chalard 82adfdaeae Make AutoCorrection static and non-instantiable (A5)
This needs change Ic6756baa to not break the build

Change-Id: I1c772dd99d63fec5d3ad67a0eb7fbc28ec7a0f0f
2012-03-08 20:56:59 +09:00
Jean Chalard 7a580a4769 Move a memory in the container class (A4)
This allows us to make AutoCorrection a purely static class.

Change-Id: I15b81bd7f3d6ea487154a5b09a81bc323be82ce1
2012-03-08 20:56:11 +09:00
Jean Chalard 9254dbcd7e Make AutoCorrection a step closer to being static (A3)
Change-Id: Ide3d9785661a672af9bc8dc0cf91cab816dd6caa
2012-03-08 20:55:49 +09:00
Jean Chalard 719f92fc77 Stop uselessly remembering a value (A2)
The value is only used in debug mode, and it can be recomputed
at the time.
This change does not impact the logic. There is however a side
effect: in debug mode, the normalized score will be displayed
also when the word comes out of the whitelist or is a valid word.
It's actually a good thing.

The end purpose is to make all methods in AutoCorrection static.

Change-Id: I1642b1fdfa6ae62b8aa2fed94a8a26ff4a7e4d0e
2012-03-08 20:55:37 +09:00
Jean Chalard ec0fca8a8b Remove useless stuff (A1)
Remove an unused method and avoid doing a useless computation

Change-Id: I29593c2e93f15857249b35bdd72ca28045056302
2012-03-08 20:55:25 +09:00
Tadashi G. Takaoka cc8c8b99bd Split Utils class to StringUtils, SubtypeUtils, and JniUtils
Change-Id: I09e91675fe7d573dad8c933ad513b21d7e409144
2012-03-08 20:30:38 +09:00
Tadashi G. Takaoka 7d6d98ecc5 Merge "Cleanup keyboard theme switching code" 2012-03-08 03:24:38 -08:00
Tadashi G. Takaoka b43f2aeb69 Merge "Fix centering more suggestions panel on tablet" 2012-03-08 03:24:07 -08:00
Jean Chalard 2b1280c0f0 Merge "Return a value for tests instead of saving it" 2012-03-08 03:10:18 -08:00
Jean Chalard 32c181bfe0 Return a value for tests instead of saving it
Change-Id: I54fa32b92e89d03a53866bd1c0ee65955dd6b3d3
2012-03-08 20:07:54 +09:00
Jean Chalard 2bb29c4674 Simplification
Change-Id: Ibced83da2398f1e9ab6a0d6a22c2ad7c8f25cb7b
2012-03-08 19:50:47 +09:00
Jean Chalard 0f1efae262 Merge "Cleanup unused imports (A7)" 2012-03-08 02:32:48 -08:00
Jean Chalard 663aabca0c Merge "Get the view for haptic feedback as a parameter (A6)" 2012-03-08 02:32:39 -08:00
Jean Chalard 85e88d30c1 Merge "Remove a useless member (A5)" 2012-03-08 02:32:25 -08:00
Jean Chalard 60705c9ed3 Merge "Simplification of sound settings (A4)" 2012-03-08 02:32:16 -08:00
Jean Chalard d2b5ea2084 Merge "Make a condition positive (A3)" 2012-03-08 02:32:07 -08:00