Also fix a typo, and increase the time allowed to load the main
dictionary to 2 secs instead of 1.
Bug: 6114326
Change-Id: I5f70b34fc4277c55977b18466253152aa98a2507
To some extent, the test was wrong here.
After space is typed in this case, we wait a small delay before updating
the suggestion strip so that we can display bigram predictions without
introducing delays. The suggestion strip is not displayed until then.
The test was bypassing this by simulating a press on the suggestion
strip, but for LatinIME it was not displayed yet, hence the bug.
The new code waits for the delay, makes sure the suggestion strip is
actually displaying punctuation marks, then press the mark and do
the intended test on space.
Change-Id: I18f82da1bc0a8e584e9b1bac59ff48823d78ec12
This is really brutal, but after trying many many things I didn't
find a better way. It works with the current implementation of
MessageQueue.
Since this only introduces a utility method it doesn't really do
anything, but the functionality it provides will be essential to
Bug: 5975557
Change-Id: I81c4113a08f9a8d8a88294d7dd3b6c8c483c8b1d
- Type "tgis", manually pick "thus", press backspace.
Backspace should revert the manual pick.
Check "tgis" is the result.
- Type "tgis" followed by a period.
Period should trigger auto-correct to "this".
Check "this" is the result.
- Type "tgis" followed by a period, then backspace.
Period should trigger auto-correct to "this", and backspace should
revert the auto-correction.
Check "tgis." is the result.
Change-Id: I7e23c8a26fbdbe23336149a05ff01bc51707422e
This change also cancels double tap and long press timers if other
letter key is pressed after shift key.
Bug: 5693999
Bug: 6017610
Change-Id: I3b5f3debfb8915fa73a93b409a38afadf24132e9
This change also uses Key.code instead of Key.outputText for the
variety of parentheses keys taht introduced by I85998f17.
Bug: 5975484
Change-Id: I86879c9942d264edc71e5893325a2f582763d12f
Seems I didn't get how to iterate on a String correctly >.>
Talk about a big bug. Anyway, I think it's working now.
Bug: 5955228
Change-Id: I988c900cf2a16c44b9505cfd4f77c7cda7e592f0
This change alters the CSV parser behavior. The parser only resolves
* String resource reference. ["@string/res" -> "<content_of_res>"]
* Other occurrence of escape sequence will be intact. ["\x" -> "\x"]
Before this change, escape sequence in moreKeys string is parsed three
times. At first in parsing string resource, next in CSV parser, and at
last in KeySpecParser. So that representing single escape character
itself is a bit annoying, "\\\\\\\\".
Now we can represent single escape character itself in string resource by "\\\\".
Change-Id: Ib978e17b779cc82585eed8241ac3857508b14bc7
This change also
* Doesn't use Key.getRtlParenthesisCode to get correct parentheses
code in RTL context. Intead uses the outputText feature of
moreKeys specification.
* Move CVS string parser from KeyStyles to Utils.
Bug: 5948247
Change-Id: I45752c7d01b4f7d3f3da900b110a2185b336a1f0
This change also
* Rename phone shift keyboard to phone symbols keyboard.
Use CODE_SWITCH_ALPHA_SYMBOL code to switch between phone and phone symbols keyboard.
* Remove phone symbols keyboard from tablet.
* Introduces enableLongPress flag of Key.keyActionFlags attribute.
* Remove clumsy long press code from PointerTracker.
* Remove CODE_CAPSLOCK handling from LatinIME.
* Make KeyboardSwitcher to invoke haptic and audio feedback.
Change-Id: I00e1f697a10ab5112aec75e36853b96246ff5054
Fix two related subtle bugs:
- Stop singling out fat-finger-only corrections for rejection
when touch coordinates are not available.
- Remove a racy check that would happen only in debug mode
Change-Id: Ic904f9b27c091ca6b369052c4e65a630bff81257
* Rename KeyboardActionListener.onPress to onPressKey
* Rename KeyboardActionListener.onRelease to onReleaseKey
* Merge KeyboardSwicther.onPressShift, onPressSymbol, and onPressOtherKey to onPressKey.
* Merge KeyboardSwitcher.onReleaseShift and onReleaseSymbol to onReleaseKey.
* Merge KeyboardState.onPressShift, onPressSymbol, and onPressOtherKey to onPressKey.
* Merge KeyboardState.onReleaseShift and onReleaseSymbol to onReleaseKey.
Change-Id: Icf28fd18e238c5e534c292893e4ab5b6b98e72f8
We need revised scoring test because dictionary look up algorithm has
been changed significantly since this SuggestTests was made.
Change-Id: I69d527a6bfa24ed0dc189fddad1afab0566c6eb8
This change introduces KeyboardSet and SubKeyboard XML definitions to
represent a set of keyboard layouts.
Bug: 5002108
Bug: 5679585
Change-Id: Ib6c8d5936187381bb6725c9fe574e93871c01a86
The ultimate intent is to close it up in the settings, as it does not
change while typing, only when the keyboard is open again.
Change-Id: I12ff56e7482c1584877fe5531473bf03e95a60f6
This bug would kill the case where the whitelist contains
a word to be autocorrected to an uppercased version of
itself, and the user would enter the uppercase version.
In this case, this bug would cause the typed word to be
killed off the list of candidates, and possibly autocorrected
to the *next* candidate.
When the whitelist checks whether this the typed word is
a candidate for whitelisting, this change has it check whether
the whitelisting results in the typed word before returning.
Hence, it can keep the case-insensitive behavior of the
whitelist.
Coincidentally, this change renames the method used to do
this, because it does not comply with the general contract
of Dictionary. This happens to be in the way of another
upcoming change.
Bug: 5420371
Change-Id: Ifb305271acc5f171adf9b18c762ae7975b14be0a
This goes together with I6b8628b9acc32449e4147a2a754b222fbb76c754
or it will break the build
Bug: 5402436
Change-Id: I07c6266b713773a8de80bb22afdd4c566261f78a
To keep unit test simple, instead of specifying top padding in
the constructor, make separate setter for it.
Change-Id: I8870622cc1bd97420637b8c465bdb6c9dd366062
Because Key only has bottom padding, to make mini keyboard vertically
symmetric and looks nicer, we should add mini keyboard top padding
that equals to Key bottom padding (a.k.a. vertical gap).
Change-Id: Icceb687d50edfa48e0f0830a60a1e230836c982f
This also fixes a small inconsistency upon clicking on whitespace
twice in a row.
Also add some unit tests for an introduced and an existing method.
Change-Id: I1be2fb53c9624f4d0f5299009632cb4384fdfc15
Some flag settings used to be stored in a keyboard layout extravalue setting. This
change:
- Introduces the capability of setting such specific flags in values/config.xml
- Retains the ability to use extravalues (for layout-specific settings), though
there is no more any such setting at the moment.
- Fixes a bug where loading a dictionary from outside does not initialize the flags.
- Moves Flag to another class.
Note: this needs I705ec68c to avoid breaking the build
Change-Id: Ia7703aae3215b06c0b3cb792821649806e8998c1
This change adds basic support for an external dictionary provider.
It adds methods for reading the dictionary itself from an asset in
the dictionary provider package directly, obtaining the file name
through the ContentProvider interface; it also adds a way of getting
the data through an InputStream and copying the file locally.
Incidentally this change also adds the code needed to listen for
updating the dictionary provider package and reloading it in time.
This change also goes hand-in-hand with Iab31db6e, which implements
the small closed part of this.
Issue: 3414944
Change-Id: I5e4fff99a59bb99dbdb002102db6c90e6cb41c8a
This changes:
* Flag initialization code in BinaryDictionary to be more unit test friendly.
* Removing unnecessary class hierarchy of LatinIME inner class WordAlternatives.
* Formatting normalized score neatly.
Change-Id: I9f10c093d4f36258fe883cf3fb10cbbda2770497
This change also introduces number password (a.k.a. PIN) layout. The
text password layout will follow.
Bug: 3384942
Change-Id: I50b5e413e47a28d5285fd0468115e11ce46c7f18
Move and rename KeyboardView.computeProximityThreshold to
KeyDetector.getMostCommonKeyWidth. And make it public for unit test
use.
This is a part of multi-project change (If751659a, Idb18f362)
Bug: 3414081
Change-Id: If751659a53c7412f836d6d28866760ffe84b179b
This change
- introduces the popupKeyboardTemplate attribute of Keyboard to
specify XML Keyboard file for popup mini keyboard.
- introduces the maxPopupKeyboardColumn attribute of Keyboard to
specify the maximum column of popup mini keyboard.
- changes the content format of the popupCharacters attribute of Key.
It now represents keyLabel, codes and keyTextOutput of each key of
popup mini keyboard using CSV format.
Bug: 2214959
Change-Id: I539e310f7e38a049ee193de0b4ad5d7afdce37b1
This change introduces new package com.android.inputmethod.keyboard
which hosts keyboard related classes.
Also adds missing @Override and @SuppressWarning("unused") annotation
Change-Id: I0317f5cfa317e13f3c77815f48ffc69b5d1ade05
This change moves SwipeTracker out from LatinKeyboardBaseView. Also
this introduces EventBuffer class for swipe tracking buffer.
Bug: 2910379
Change-Id: I48ff714226a248ca063cbaf9755cf45e458f7402