This allows the user to enter a period via double-space after quotes,
currency symbols, brackets and other non-sentence-finishing
punctuation marks.
Bug: 3430389
Change-Id: Ibe40b3902861207eb918e7be6113e8be12216f53
When the User dictionary service is off, LatinIME still allows to add
words to it and it crashed if the user tries to do so. This change
fixes the crash; it does not however fix the interface.
Bug: 5004408
Change-Id: I5bd2684ab3010963c1f737fc764e70e79aadbe8d
Before starting input on new TextView, we must clear the CandidateView
because it may hold the suggestion of previous TextView or even worse
the suggestions pane has been expanded and keyboard has been hidden.
Bug: 4995414
Change-Id: If848320c1a510e7018d36ed8ac61291be2fc6ce5
This change also rename static inner class to more readable name and
get rid of unnecessary object reference from PointerTracker.
Bug: 4768084
Change-Id: Ie4e2b940d66b47d41efcae7eeac853cdae2e4d38
To sort out the issue, main keyboard and mini keyboard have to share
the pointer trackers.
In order to prepare for that, KeyboardView needs to be refactored as
two separate classes. KeyboardView is responsible for drawing keyboard
visual. And LatinKeyboardBaseView is responsible for handling key
event and mini keyboard as well.
Bug: 4768084
Change-Id: I5643e333b9bdfde0c939a0693cea76bd22f38897
Up to version 10 (Gingerbread) of the API, FrameLayout doesn't handle
margin properly. This change inserts RelativeLayout to FrameLayout as
placer to set margin and place children views absolutely.
Change-Id: Iee785bc2da77677738caf456bcd2bbf57b89f007
To maintain backward compatibility back to Froyo, we can't call
3-argument constructor of LinearLayout.
Change-Id: I35310704f92812d2748d32f35820a5058fa2bf31
I left TODOs in Suggest.java because we must pay attention to locale
when changing character's case. Filed another Bug: 4769095 to track
that.
Bug: 4768050
Change-Id: I1ae2c4ffd2208403a8c2a25dd3a56b71dcefc826
The dictionary that extends ExpandableDictionary must be closed when
it becomes unused.
Bug: 4725930
Change-Id: Ib5d2c39771fb7010d303a26d1ea1c8e237c0101f
When using the sliding spacebar language switch on ICS, both
LatinIME.toggleLanguage() and
InputMethodService.onCurrentInputMethodSubtypeChanged() invoke
LatinIME.onRefreshKeyboard(). This change eliminates the first one if
it isn't necessary.
This change also cleans up the followings.
* reuse theme Context when the keyboard theme hasn't been changed.
* clear the Keyboard cache when theme has been switched.
* eliminates unnecessary Context reference from LatinKeyboard and
SlidingLocaleDrawable.
* recycle Bitmap and reuse Canvas in KeyboardView.
Bug: 4725930
Change-Id: I87366e9304879d94d12b7345adea768d86d43519
This change removes horizontal scroll from candidates strip. Instead
of that this change introduces "fixed 3 items candidates strip" and
"expandable candidates pane".
Bug: 4175031
Change-Id: Ia367d9074436fdea76d3b653d81798ce2749170e
This prepares the way for spell checking, which is to be done
without context so without proximity info.
Bug: 4176026
Change-Id: I1b4bfaefe2611e1b484acdf3c33598cb80f81ff4
This change fixes a bug that prevented to choose a prediction
several times in a row because the predictions would be replaced
right away by punctuations.
Please note several things about this change:
- Recorrection is pretty much in the middle of being refactored.
This change has no effect on recorrection itself, but may make
existing strange behavior more obvious when moving the cursor
for example.
- The part of this change in Recorrection.java is not used in
master at the moment because ongoing changes on recorrection
result in the control never landing there, but would have been
needed in the past and may be needed in the future.
- This change may have adverse effects on performance which need
to be evaluated. A comment in the code has also been written
to this effect.
- This does not fix bug 4466199, only addresses a pinpoint case
of it to help evaluating the bigram predictions feature.
Bug: 4466199
Change-Id: I7219e5aeb74dff9251d12b2a72f94448dbb3e63f
This change introduces new keyboard mode "webEmail" to honor
InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS. In this mode, both
'@' key and TAB key appear on the keyboard.
The keyboard layouts will be modified with other change.
Bug: 4490948
Change-Id: I66f9bda4907da448db097e9c900199dfa700b16a
When keyboard theme has been switched, input view will be replaced
with new theme one and current CandidateView will get stale. The
CandidateView must be reseted in setInputView.
Change-Id: I36fd14280572d2d367cfef549d7705b3b321ba3e
One of the two methods for getting a dictionary from the dictionary
pack had a bug and would not tolerate not getting an actual dictionary.
This change fixes that.
Change-Id: Id58bb27258494fb3aa60ec07a4eb27cfb5cc7279
Also add an option for popup dismissal delay so as to inaugurate the
new screen. Besides, remove a path for options to escape from
LatinIME and replace with a direct read from the settings.
Change-Id: I7ec6e724262871fa6523506ecc39f65c5fbe34da
Fix a bug where the "Touch again to save" message would not stay
on screen, following a wrong fix for a problem where Gingerbread-
would not display punctuation in the suggestion strip in
WebTextView.
Change-Id: I3556f83f867240ed7f16753450e6c975853208e5
Split symbols into:
- Symbols that should swap themselves with a magic space.
- Symbols that should remove the magic space.
- Symbols that should transform the magic space into a real space.
Also, have symbols inserted from the suggestion strip always consider
the space before them to be magic.
Also, do minor refactoring to remove useless variables or make clearer
how to carry some symbol-related information.
Bug: 4391347
Change-Id: Ie2308a62c8fef55e3610897c0f58943acb7aa8c9
Picking a suggestion inserts a space after the word. This change makes
this space a magic space.
Incidentally, do some minor cleanup: add CODE_DASH, CODE_SINGLE_QUOTE
and CODE_DOUBLE_QUOTE to Keyboard and use them throughout the code,
and remove a useless import directive in some unrelated file.
Bug: 4319740
Change-Id: I245f396c34dd0af820bca91edc4ec363238a4ae4
This change enables the interface to get multiple dictionaries from a
dictionary pack. It only implements it to the end in the case of the
proprietary method, as the open method needs still some working out,
and the "inside the package" method does not need it.
This change goes together with Iaa95bf36, and breaks the build
without it.
Bug: 1752028
Change-Id: I3ccfd696e8ef083ef9c074e1c3e4bb0bf2fcfd23
The change list that introduced this code was created at the same
time as the one that introduced the Utils.setSystemLocale method
and didn't use it yet. Fix this.
Change-Id: Ifdd2ad9f7dbb7f300bc255bc2e035ae893a9d410
The dictionary collection is a class complying to the Dictionary
interface that acts as a front end to a collection of arbitrarily many
dictionaries of any type.
The dictionary factory is a helper class for creating various
dictionaries and get some meta information about them.
At the same time, this change makes the BinaryDictionary class
not a singleton any more.
This also needs I9afe61a9 to not break the build.
Change-Id: I61fdcc4867fcda18342807bf1865e6e46979e5d5
Add a setLocale method to Utils that returns the previous locale.
Also unify all calls through the code.
Change-Id: Ic850dc5df19fba00ed3601835652859b4321b544
This change is only there to fix warning issued by Eclipse.
It should have absolutely no impact on the program logic.
Change-Id: Ie0e242ac6c167297d33de19902340b0f6ecae9e1
This change also rename methods that should have been renamed in a
previous commit (namely, the
*SetBigramSuggestions family -> *UpdateBigramSuggestions)
Change-Id: I18cac17ba2b93fcc011ea133324f2c7f3532946c
This change adds the option for bigram prediction under the option
for bigram suggestion. The "prediction" option depends on the
"suggestion" option.
This change also reorders a tad bit the settings screen. Namely, it
sticks both bigram options under a "bigram" category, and groups the
options that did not have a group under a "other options", or misc,
category.
Finally this change also renames the internal name of the "text
corrections" option category to "correction_category" instead of
"prediction_category" which was misleading.
Change-Id: I2d8787c8a391fd8202ed3a686c613494b7260a1e
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 update is necessary to allow dictionary content providers to use
assets, which are part of their apk, as data to pass to the keyboard.
Using plain file descriptors doesn't allow for sections of files to
be correctly used.
Change-Id: Ia94c26d6387bce61c73d38f5c2821f20e50e54d4
Previously the key preview was implemented by PopupWindow. The key
preview popup window would be dismissed and shown each time the key
was released and pressed. It turned out that it was taking several
milliseconds.
This change implements the key preview by a simple TextView which will
be layout-ed at absolute coordinates within the screen FrameLayout.
And dismissing and showing the key preview is implemented by the
TextView's visibility.
This implementation needs careful coordination of candidates.xml
layout and LatinIME.onComputeInsets to control suggestion strip
visibility.
Bug: 4179964
Change-Id: Id6347cb35b91eb14ab20dd2f312e58b54b6625a7
- Have user-history based bigrams used as soon as they are entered,
not after 6 times.
- Limit bigram frequency to 255 (this limits the multiplier to 1.8, and
has no effect on main dict bigrams which already have this limit)
- Some TODO resolving
bug: 4192129
Change-Id: I4777f1a58c43dd55381c4b01252d722ab3a70547
- VoiceConnector to VoiceProxy
- VoiceInputConnector to VoiceInputWrapper
- VoiceLoggerConnector to VoiceLoggerWrapper
Change-Id: I908ddc590c8846cf5cbd80b9c0257cb65c638bde
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 corrects usage of "frequency", "priority" and "score"
* Frequency is the relative probability in dictionary.
* Score is the relative probability in suggestions.
* Priority is kind a sorted score.
Change-Id: Iafb135a4ecdb401cc505014a07c74dfcac44d699
It used to be the case that the scoring system turns up the same word
that was entered with a different capitalization, but with a lower
score than some other, more frequent word. To cope with this, there
was code that would order such candidates in the first slot no matter
what. This processing is now useless because fully matching words now
have a huge boost that ensures they will get to the top of the list,
before any non-fully matching word (which means, differing only by
capitalization or accents).
The bug that did happen with this was, if a fully-matching word got
matched by several processing passes, and the (chronologically) later
score affected to this word was weaker, it would result in the
duplicate removal pass removing the stronger score. This in turn would
mess with autocorrect.
In an effort to keep the risk at a minimum for MR1, this change does
not actually remove the useless code, but adds a check in the odd case
to avoid the bad situation. Another change will remove the code for
ICS release.
bug: 4100269
Change-Id: I18c0575332981ffec0e257e26a360995838d521e
Words that matched user input with skipped characters used to be demoted
in BinaryDictionary by a constant factor and not at all in those dictionaries
implemented in java code. To represent the fact that the impact of a skipped
character gets larger as the word is shorter, this change will implement a
demotion that gets larger as the typed word is shorter. The demotion rate
is (n - 2) / (n - 1) where n is the length of the typed word for n >= 2.
It implements it for both BinaryDictionary and java dictionaries.
Bug: 3340731
Change-Id: I3a18be80a9708981d56a950dc25fe08f018b5b89
For German : handle "ae", "oe" and "ue" to be alternate forms for
umlaut-bearing versions of "a", "o" and "u".
Issue: 3275926
Change-Id: I056c707cdacc464ceab63be56c016c7f8439196c
This change removes the boolean flag mJustReverted. Because we
preserve separator after canceling auto-correction according to
bug#3230708, there is no need for this flag now.
Bug: 3193810
Change-Id: Icea06ece569774b494ffa4ca4a899c898661cc19
At the moment, if there is no binary dictionary, even when pressing the
word in the suggestion strip the option to save in the user dictionary
is not displayed. This change addresses that.
Bug: 3363756
Change-Id: I4993a7f81ed15ab948a3098cdc49663e0f109e4a
This change deprecates "nm" private IME options and introduces new
private option, <package name>.noMicrophone, instead.
Change-Id: I9d5e3daaead2cdd42e017cd29f5f786ef3ba3649
When entering a word without accents the user expects the system to
add accents automatically if there is no other matching word. This
patch ensures the accented version is promoted accordingly and
autocorrection really takes place.
Issue: 3400015
Change-Id: I8cd3db5bf131ec6844b26abecc1ecbd1d6269df4
This change also introduces number password (a.k.a. PIN) layout. The
text password layout will follow.
Bug: 3384942
Change-Id: I50b5e413e47a28d5285fd0468115e11ce46c7f18
It appears it is not useful to listen to this change, because in any
case, settings will be reloaded when the view is shown again or when
IME is changed.
Change-Id: I08dddccc630b01718da7fab011ce14f189dd31c3
Also change the name of the default value for re-correction for
consistency with other constant names.
Bug: 3426884
Change-Id: I615ba640fb17e6d7514b8a0e4f52028eb0e23908
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
Change the default value when retrieving the PREF_SOUND_ON property
from the Settings from false to true.
Change-Id: I871cfaaf1f33b5e0301c84ee9c94f1c429901021
Killing the process allows for some settings that are read only on
service start up to be correctly read again.
Change-Id: Ia48f2ca4760a530ac47b727f290d606715cb6bde
If the configuration says the device should not display the "Pop up
on key press" setting, then do not read the preference and always
use the default setting.
bug: 3406181
Change-Id: Ice2989760cda1d40387ed88311144cbf2c114b93
Bug: 3374359
Bug: 3278422
"zbe" will be auto corrected to "be" by fixing s-line
"teh" will be auto corrected to "the" by promotion of full matched words
Change-Id: I314c632820e4e0b1501edeca60ada205d291451f
This reverts commit de59a84029 (Ie8d4469b).
The requested feature has been implemented by I92d98bed.
Bug: 3238092
Change-Id: I9d53030b3d5c9a0f24883292a93576a3231813aa
This change aslo eliminates duplicate suggestion from past
suggestions. And call setTypedWordVaild to past suggestions.
Bug: 3367722
Change-Id: I7ffaa2f7e4e30b3951b6c2df002d269671c9d654
Conditionally remove the "Quick fixes", "Bigram suggestions" and
"Usability study mode" options, depending on configuration.
When disabled, have the quick fixes and bigram option become
false if autocorrect is off, and true otherwise.
Also reorder options to bring "Auto correction" above "Show
suggestions".
bug: 3282448
Change-Id: Ib7fd928be417a816ef9e21423a531773069b7468
Add a "General" category to enclose general settings, and rename
"Word suggestion settings" to "Text correction".
bug: 3282448
Change-Id: Ie695683af0646974da82e29e11d1c3a785ef46c7
There has been a bit of refactoring in RecognitionView in particular to fix the portrait layout.
The main issues found were:
- the size of the keyboard is specified in inches, and
(cm)(inches + inches) != ((cm) inches) + ((cm) inches))
- the height of keyboard background is high as the landscape keyboard, but it higher than
the portrait keyboard. This is not an issue on LatinKeyboard, as it overwrite the
onMeasure method. However, if I use the same image background in RelativeLayout
the Relative layout height is set to the height of the background, thus higher than the keyboard
- the change configuration was not propageted correctly
Change-Id: Id5dca425826997c573ccae7a085d5ddc9719733b
Do not show the recorrection option on xlarge terminals,
and make it true by default. Also, bring the Auto-capitalization
at the top of the settings page.
Issue: 3282448
Change-Id: I51a9ae6c7e496be2970107277f0a4ac65b12821e
Add an option to mask the sound on keypress preference, and
make it false on xlarge terminals by default.
bug: 3282448
Change-Id: I747272d9edf854dc229aa620836cfa35a437d13f
This change also draws the language name in light gray on spacebar
without fading out even when the keyboard locale has not been changed.
Bug: 3362369
Bug: 3361915
Change-Id: I66538b03ce2e48c3441091319d0377176f8118ec
This change reverts removing SubtypeSwitcher.onConfigurationChanged by careless in I432be8f7.
Bug: 3290290
Change-Id: I796ea01877d61eb750dabdeb3fdbf87666646c56
This change also introduces the following.
* space bar language switcher is enabled for phone device.
* get rid of spcae key icon from number keyboard of tablet.
* slightly lower the position of language name on space bar of tablet.
Bug: 3290290
Change-Id: I432be8f757bcc84c257770112ff1f6fa7970c584
ApplicationInfo.sourceDir may or may not be apk file name. It can be a directory as well.
The spec just says it's "Full path to the location of this package".
Also, added error handling in loadDictionary().
Change-Id: I5e64d0aba4b1ec7634f4b3ac5537e7a774433ece
This change is a preparation for upcoming optimizations on dictionary file loading.
* We can consolidate dictionary files because we are no longer relying on Asset Manager.
* Stopping compressing dictionary files as planning to use mmap() on the region in the apk file.
* Probably we won't rely on Asset Manager. Instead we'll probably use offset and size obtained from AssetFileDescriptor.
Change-Id: Id57dce512fd3d2397a58628f8264bd824194da76
This change also fixes auto snap back behavior of key which has output
text, such as smiley key.
Bug: 3297825
Change-Id: Ia06e1abc0fbdff2a26504ddcce1dc7f933b45453
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 re-implements CandidateView using HorizontalScrollView and
customized Button, so that the candidate strip can be flingable.
This change also introduces the following features.
- Highlighting candidate strip and space bar is configurable by
@bool/config_candidate_highlight_enabled.
- Candidate strip can be centered with left/right padding if
@dimen/candidate_strip_padding size is greater than 0.
- Candidate text size is configurable by @dimen/candidate_text_size.
Bug: 1575885
Bug: 3230726
Change-Id: Iedf78ff31bc9f2f6291a8e8fb7faa0e6b961dd6d
This change,
- changes voice key code back to -102
- renames some key code names and method names
- adds mic_slash_holo to drawable-hdpi
Change-Id: I8be3a20921f472ece4298edad2d275f29a7e4955
This change also moves KeyboardSwitcher and related classes to
com.android.inputmethod.keyboard package.
Multi project change with Ib23017b2
Change-Id: Id7d54b24615fe22ebb540ca847549909e346ee24
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 introduces,
- center align "More" key label
- remove drop shadow from key label
- darker key label color when manual temporary upper case
- narrower pop up mini keyboard
- remove unnecessary key background from pop up mini keyboard
- smaller key label in portrait
Bug: 3216592
Change-Id: I77e0733f467a88aa32e09fcbace56fe08f755229
This change introduces shiftedIcon attribute for Key which specifies
icon to draw the shift key while the key is in shifted state.
This change also intriduces new configurable dimension value
key_label_horizontal_alignment_padding which represents horizontal
padding for left or right alignment of key label.
Bug: 3216592
Bug: 3201839
Change-Id: I3aa7392227ce573c404517678e6340a8d1fcb328
This change also uses slightly larger font size for functional key
label according to the v4 keyboard design.
Bug: 3216592
Change-Id: I027f109b7748ade8564dc808487d9a6ce1da9761
This change is a followup of I948ef26f
Automatic Temporary Upper Case mode acts like Normal mode until shift
key is pressed. However, after shift key is pressed, it acts like
Manual Temporary Upper Case mode.
Bug: 3193390
Change-Id: Id3d7a38a1f5905322cd46ded36b1db26576d49af
With this change,
- Shift and Shift lock state of keyboard is maintained by
LatinKeyboard.ShiftState.
- Shift key state is maintained by ShiftKeyState object in
KeyboardSwitcher.
- LatinIME informs KeyboardSwitcher that shift key press, release and
long press and KeyboardSwitcher determines which state LatinKeyboard
and ShiftLeyState should be.
Bug: 3193390
Change-Id: I948ef26fda512eb1cb0ebddc89d322c4f4f4d670