This also addresses the defaults for voice button on a wiped device.
I think it also addresses mic button showing up when not expected by a specific text field
that has the privateImeOptions of "nm".
Bugs 2417842, 2242893
Due to the addition of input language switching, the auto dictionary
will be re-created very frequently. We need to save it and restore it
during transitions, otherwise the data will be purged too often to be
of much use in the multi-lingual case.
This also fixes the case where a user frequently turns the phone off/on.
Auto dictionary data was not being saved in those situations either.
The dictionary will probably never grow too large since most of the
frequently used words will be moved to the user dictionary any way.
Also, now the input locale is different from the display locale, so
save the input locale in the UserDictionary class and insert words
into the user dictionary with the correct locale.
And NPE fix for bug: 2464573
This increases the chance of hitting the correct letter when typing a word
that exists in the dictionary, rather than only correct it after the fact.
It is most effective after 2 or 3 letters of a word have been typed and gets
more accurate with more typed letters in the word.
If 2 adjacent letters have similar probabilities of occuring, then there is no
hit correction applied.
Shows the language on the spacebar and in the preview bubble. Allows
dragging of the spacebar from side to side to switch to previous or
next languages.
Open-sourced platform code shouldn't refer to Gservices. Use the
platform-standard Secure settings table instead (which we can still
push values into from the servers on google-experience devices, like
gservices), but can be populated by other mechanisms for non-ged
phones.
Change-Id: Id0b5830bfc78c1d10dc732dce46546cd09cd1422
Microphone button can be optionally moved to the symbols keyboard
to get your comma back. You can also completely disable voice input.
Now you can get your comma back but still use the swipe gesture to
activate voice input.
the change to logging to remove any private dependencies and use
broadcast intents to VoiceSearch instead.
I have audited this code and it appears good to go for open-source,
but would appreciate a second pair of eyes.
Still to do after submitting this CL:
* Reintroduce Amith's memory leak fix (37557) which was the only CL
added to LatinIME since the last merge over to the private copy.
* Make some changes to allow LatinIME to work without voice search
installed. Currently I believe it will show the mic but fail if
you press it. We need to base the visibility on the mic on the
availability of the service.
* Fix this code to use the new Gservices framework, it's still trying
to use the old one.
New feature to enable fast switching between input languages for
multilingual users. Keyboard settings lets you select a bunch of
languages to switch between from the Latin IME.
Use the Globe icon to toggle between languages.
Needs more work and some layout changes in specialized keyboards.
Also added a Russian keyboard (needs some pixel TLC at the right edge).
There was a delayed changing of keyboard to lowercase after typing
a shifted letter that was triggering after the user pressed shift
again. Removed the delayed message when user hits shift.
Comparisons were always happening with lowercase version of the typed
word, which wouldn't match the uppercase word in the dictionary, so it
became an unrecognized word when typed in full. Highlight was then going
to the next word in the list.
Fix compares the lowercase and uppercase versions of the word for
validity.
This is caused by a delay in changing the shift state for performance reasons.
The delay was too long, causing multiple characters to be in shifted state when
typing fast (300ms interval).
Fix removes the optimization for the forward typing case. Doesn't affect the
backspace long-press optimization.
Triage: Hiroshi
Dr. No: mcleron
Sometimes the keyboard is getting confused about it's width when switching
between hard keyboard open and close state and portrait-forced home. Force
creation of keyboard layouts after a configuration change to fix the
inconsistent state.
Don't force create when just switching between input fields, too expensive.
Also fixes the problem of keyboard not changing layout after a locale change,
unless there's an orientation change.
The KeyboardSwitcher was remembering state from a previous edittext
where the user was in symbols mode and applying the switch code
when user hits space in the new edittext for the first time.
Make sure to reset the state when a new keyboard mode is requested.
Also make sure that we don't switch from symbols to alphabet keyboard
when editing in a number/datetime field and hitting space.
Makes the user/contacts dictionary lookup faster. This is necessary because
there's more in these dictionaries now and it's written in Java.
Fix an auto-caps issue when moving the cursor. And do it a little lazily.
Fixed a bug that was causing user dictionary words to get a much
higher weightage than the main dictionary.
Don't auto-correct if the typed word has more than one uppercase letter.
Also, delay applying shift state to the keyboard so that fast backspaces are not interrupted by the
time taken to render the shifted/unshifted keyboard.
Show ellipsis on the ?123 key