Commit graph

59 commits

Author SHA1 Message Date
Amith Yamasani
4032c24b73 Fix 2414566 : Capitalizing first letter in unexpected fields.
Also move some symbols around as per yaks' request.
2010-03-01 23:33:07 -08:00
Amith Yamasani
1ca2267119 Fix for microphone icon showing up incorrectly on the ?123 icon.
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
2010-02-26 11:47:05 -08:00
Amith Yamasani
9468335a06 Fix for 2466885 : Key prediction is spilling over to next word. 2010-02-25 10:37:19 -08:00
Amith Yamasani
6516d0fdfc Save and restore Auto Dictionary data.
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
2010-02-24 06:36:19 -08:00
Ken Wakasa
4ca6d9dc09 Fix screwed up ellipses with auto-spaces. Bug: 2455867 2010-02-23 08:55:32 +09:00
Amith Yamasani
8472bb611e Fix for "smiley after voice input erases the voice part". Bug 2415033 2010-02-22 09:24:09 -08:00
Amith Yamasani
a9f4b19ca4 Switch keyboards when configuration changes. Bug 2432435 2010-02-21 18:11:39 -08:00
Amith Yamasani
32e1c1c338 Fix Auto-complete toggle - was broken in a recent change.
Also allow decoupling Quick Fixes from Suggestions and auto-complete.
2010-02-19 16:38:58 -08:00
Amith Yamasani
fac5dcb5fe Don't apply autotext to the wrong input language.
Since autotext is tied to the display language, if the input lang
is different from the display lang, don't apply autotext.

Bug: 2417495
2010-02-18 11:09:43 -08:00
Amith Yamasani
db84e0318c Remove dependency on google-common library.
Copied the newArrayList method over to LatinIME.
2010-02-17 14:42:51 -08:00
Ken Wakasa
9a503e07d5 Remove a trailing "auto space" at the end of the line when the user added a new line.
Bug: 2384116
2010-02-12 00:01:02 +09:00
Amith Yamasani
66a787b953 Show a hint when the user selects the typed word from the suggestion list.
Make it easy to add new words by tapping the word again.
Also, a small unbundling fix for vibration duration.
2010-02-10 17:45:35 -08:00
Valentin Kravtsov
960ea65f3f Adding RecognitionManager.isRecognitionEnabled() check
This CL adds an aformentioned check to decide whether to show the mic button or not.

Change-Id: Idee6978b69777ac3118406219e96340d892c6508
2010-02-10 10:50:11 +00:00
Amith Yamasani
457fdffce4 Change the voice checkboxes into a 3-state list.
Also add a language-switch hint
2010-02-09 15:22:26 -08:00
Amith Yamasani
1b62ff1a3d Increase target size of preferred letters while typing.
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.
2010-02-08 15:22:37 -08:00
Leon Scroggins
8fa317a61a Send KeyEvents for Tab.
Needed for http://b/issue?id=2414236
2010-02-08 13:09:35 -05:00
Kristian Monsen
1322b7f899 fixing ime crash in emulator
Just guarding some calls with if (VOICE_INSTALLED). Also added an &, probably a typo.
2010-02-05 12:11:59 +00:00
Mike LeBeau
2e3aa86cf3 Add additional language information to FieldContext used for voice input.
This will allow us to choose the right voice input language for the user
on the VoiceSearch side.
2010-02-04 19:43:44 -08:00
Amith Yamasani
6a6075caba Suggest punctuations between word suggestions, for easy access to ?,!, etc.
Also fix a visual bug with the dividers between suggested words.
2010-02-03 15:55:12 -08:00
Amith Yamasani
3f7d75060a Language switching with slide gesture on spacebar. Bug: 2331173
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.
2010-02-01 09:49:24 -08:00
Ken Wakasa
41a5197295 Make the ".com" key input smarter if there's already '.' at the end of the previous text.
Bug: 2306114
2010-02-01 01:40:59 +09:00
Amith Yamasani
b8f98ad014 Fix a crash when starting up LatinIME or changing orientation. Bug:2403575 2010-01-28 12:35:29 -08:00
Doug Zongker
a16ff1b19e remove references to Gservices from LatinIME
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
2010-01-28 10:09:44 -08:00
Amith Yamasani
b1cd701602 Setting to move microphone to secondary keyboard.
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.
2010-01-28 07:33:27 -08:00
Amith Yamasani
cf02653097 New keyboard layout for bottom row.
Additional mode for WEB_EDIT fields w/Tab key for next field.
Button assets refresh and fix for a highlight asset bug.
2010-01-27 14:03:42 -08:00
Amith Yamasani
1c55125110 Auto-added words will only be capitalized if user intended to. #2373284
If a user creates a new word at the beginning of a sentence, then don't
add it as a capitalized word in the dictionary.
2010-01-24 07:34:07 -08:00
Amith Yamasani
8eb2e34d5b Enable language switching with long-press of space bar.
This is a temporary solution until slide-on-space is implemented.
2010-01-22 13:57:20 -08:00
Mike LeBeau
d856450612 Reintroduce Amith's memory leak fix from 388ce92ab8,
after it was clobbered by my overwrite of LatinIME with the voice version.
2010-01-17 16:55:56 -05:00
Mike LeBeau
466741d8a7 Migrate voice features into the open-source LatinIME. This includes
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.
2010-01-17 02:42:58 -05:00
Amith Yamasani
388ce92ab8 Fixed a memory leak that happens when switching input languages. 2010-01-15 13:43:50 -08:00
Amith Yamasani
e8f1edefeb Enable auto-correction only if there is a significant size main dictionary.
Added e-umlaut popup for Russian keyboard.
Added a French Canadian string resource but wont help until we add fr_CA to
the supported locales list.
2009-12-18 14:32:48 -08:00
Amith Yamasani
6a442663d6 Fix for auto-add and reduced auto-add threshold. Bug: 2332071
Fixed the regression of auto-add.

Reduced the threshold of auto-add (to accept) to 2 times.
Reduced the threshold of auto-add (to suggest) to 4 times.
2009-12-16 19:21:11 -08:00
Amith Yamasani
36fcf25833 Input language switching. Bug: 2331173
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).
2009-12-16 17:48:23 -08:00
Amith Yamasani
82c68bfbfc Fix for 2305181: "shift A shift M" quickly gives Am instead of AM
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.
2009-12-04 11:58:57 -08:00
Amith Yamasani
f590a49739 Fix for 2295810: Auto-correction of English results in Englishman
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.
2009-12-01 11:44:22 -08:00
Amith Yamasani
8850bdc7e4 Fix for 2170453: Capitalization sticks when entering passwords in Browser
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
2009-10-12 12:59:34 -07:00
Amith Yamasani
eef539c3f2 Fix a potential IllegalArgumentException caught by monkeys. #2176776
For some reason the key code is outside the code point range. Adding
a safeguard to deal with possible out of range key codes.
2009-10-09 07:03:11 -07:00
Amith Yamasani
12e582c79c Fix 2146178: On-screen keyboard is wider than screen
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.
2009-09-30 21:15:47 -07:00
Amith Yamasani
56f96fe05b AI 150810: Fix for 2023252 & 2023256: Turkish accented characters for the keyboard
BUG=2023252,2023256

Automated import of CL 150810
2009-09-30 17:37:51 -07:00
Eric Laurent
2296317b8f Fix issue 2141503: Keyclick sound doesn't honor volume settings.
Align sound effect volume on music volume.
2009-09-29 12:00:38 -07:00
Amith Yamasani
36ebae2e8d Handle new flag NO_SUGGESTIONS and no auto-correct for single-line fields unless requested. Fix: 2030364
Don't show suggestions if NO_SUGGESTIONS flag is specified. And don't do auto-correction unless
explicitly requested or it's a multi-line text.
2009-09-17 11:10:15 -07:00
Amith Yamasani
d9688c77a9 Adjust the size of bottom row of keys for email mode. Fix for 2099889
Also recreate the keyboards when locale changes.
2009-09-08 15:55:17 -07:00
Amith Yamasani
e3803800c5 Fixed accidental switch to symbols mode from alphabet.
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.
2009-09-01 14:05:19 -07:00
Amith Yamasani
5d11ccc27d Swipe down gesture to dismiss keyboard. 2009-08-27 17:35:33 -07:00
Brandon Ballinger
71351469e3 Use public SDK APIs for the InputMethodManager and Vibrator. 2009-08-13 18:03:48 -07:00
Amith Yamasani
3263841911 Some performance optimizations.
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.
2009-08-13 18:03:41 -07:00
Amith Yamasani
81115075d2 Fix a stack overflow when typing long words. Limit the size of auto-added words. 2009-08-13 17:30:57 -07:00
Eric Fischer
2bed1531c2 Have the Latin IME also use the names of your contacts as suggestions.
Bug 1597304
2009-08-13 17:27:30 -07:00
Amith Yamasani
d67fe0e758 Improve auto-add heuristics.
Also add auto-switch back to alphabet mode on pressing enter key.
2009-08-13 17:27:12 -07:00
Amith Yamasani
4a7ff90d51 Less aggressive CAPS mode prediction.
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
2009-08-13 17:26:55 -07:00