Commit Graph

310 Commits (08a6f2aea71d998206c47c16dcda4eaa90f8c9ea)

Author SHA1 Message Date
Jean Chalard cb3320179d Actually use the bigram prediction option.
This change also rename methods that should have been renamed in a
previous commit (namely, the
*SetBigramSuggestions family -> *UpdateBigramSuggestions)

Change-Id: I18cac17ba2b93fcc011ea133324f2c7f3532946c
2011-04-22 16:36:20 +09:00
Jean Chalard b50591295d Add an option for using bigram prediction.
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
2011-04-22 15:53:48 +09:00
Jean Chalard 89bd776cf6 Use user-history bigrams when no input if available.
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
2011-04-22 15:46:23 +09:00
Tadashi G. Takaoka d2c5fdda86 Rename and reorganize key code
Change-Id: I13d6fef7af1c4356a22b0e8aebc9e613b1693ece
2011-04-21 20:32:33 +09:00
Tadashi G. Takaoka 46ca845848 Compute content and visible insets even in voice mode
Bug: 4317779
Change-Id: If54d15466db9d0362b4470a2ba4618377bdffc2a
2011-04-21 15:20:37 +09:00
Tadashi G. Takaoka d9786ce2e3 Refactor key preview code
This change removes mOldPreviewKeyIndex from KeyboardView.

Bug: 4298393
Change-Id: I832eb6deab7e078609973bf0b8be09f73db204d7
2011-04-19 20:32:57 +09:00
Jean Chalard 646d950ed8 Receive a broadcast that the dictionary has been updated.
Change-Id: I9751cc627a835a4061f144c48ff51e9d81b2c93b
2011-04-14 20:52:25 +09:00
satok 6d9021527a Fix for language bar switching
Change-Id: Id3974642b62b012968c537eff7c1a7ee37e2def2
2011-04-14 12:34:48 +09:00
Tadashi G. Takaoka dc3d4e8c06 Merge "Fast key preview" 2011-04-13 03:12:06 -07:00
Tadashi G. Takaoka 7a3d3ae17f Fast key preview
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
2011-04-13 18:59:33 +09:00
satok 88fc9d4418 Support language bar swich for InputMethodSubtype
Change-Id: Ie49f0c1c7aea135331dc1d4a635197b3f4a96e93
2011-04-13 17:05:24 +09:00
satok b5d17e52fc Add logOnSeparator
This is a supplement for  I9abb8141f23100d

Change-Id: I529d2a78f4fe630611db4cba830d933370c8c34f
2011-04-08 15:24:55 +09:00
satok 6f18a1fbcc Disable Recorrection when APIs are not supported.
Change-Id: I3b8fdc149d350215fd4852a50456824fe3fabe0b
2011-04-01 16:09:06 +09:00
satok e9957752bc Added InputTypeCompatUtils
Also Moved utilities related to InputType to InputTypeCompatUtils

Change-Id: Iab8ff5389f624f2abe627ece2acb156b0e1285ef
2011-03-25 00:46:40 -07:00
satok b2707856ab Added InputConnectionCompatUtils and EditorInfoCompatUtils
Change-Id: Ie69d5e90c4ee978d3ecb40b68e6466082569ca7a
2011-03-24 22:57:58 -07:00
satok 5a41db8814 Merge "Moved a functionality of setOverScrollMode to InputMethodServiceCompatWrapper" 2011-03-24 22:41:04 -07:00
satok a3ef6cde21 Moved a functionality of setOverScrollMode to InputMethodServiceCompatWrapper
Change-Id: Ie473c9fced9f0a8da5643390b44aa4b86128396d
2011-03-24 22:02:21 -07:00
satok 01829b8847 Merge "Added VibratorCompatWrapper" 2011-03-24 21:49:00 -07:00
satok f000bdc696 Merge "Moved a functionality of setting touchableRegion to InputMethodServiceCompatWrapper." 2011-03-24 21:28:25 -07:00
satok 699e429f19 Added VibratorCompatWrapper
Change-Id: I7640f051873f42aa15337edc718ac95ec1c51698
2011-03-24 21:25:22 -07:00
satok b86905943c Renamed Proxy classes
- VoiceConnector to VoiceProxy
- VoiceInputConnector to VoiceInputWrapper
- VoiceLoggerConnector to VoiceLoggerWrapper

Change-Id: I908ddc590c8846cf5cbd80b9c0257cb65c638bde
2011-03-24 17:50:19 -07:00
satok 24119dfd41 Moved a functionality of setting touchableRegion to InputMethodServiceCompatWrapper.
Change-Id: I8b9fe507885ef5ae7cb09db93a977e23b1bbd0db
2011-03-24 13:27:45 -07:00
satok 10dd34de0f Add InputMethodServiceCompatWrapper for moving the callback from LatinIME.
Change-Id: If6b0180c63738e5e78a20fe5b938ef50d62865d6
2011-03-23 01:12:27 -07:00
satok 610f1dc855 Use reflections for classes related to InputMethodSubtype
Change-Id: Ica53ce879c2b4c5eb47f757fb788a795a881c30e
2011-03-18 22:49:57 -07:00
Jean Chalard 0a7cf81ca2 Merge "Add different ways of reading the dictionary file." 2011-03-18 12:19:00 -07:00
Jean Chalard cba93f50c3 Add different ways of reading the dictionary file.
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
2011-03-18 12:16:50 -07:00
satok 2cff4d7e4a Added CompatUtils for starting a language selector
Change-Id: I158414efaff43d0c6abe1f9af83ed3425992dfb9
2011-03-18 12:33:04 +09:00
satok 9807ab27ea (Refactor 1) Moved voice related codes to deprecated/voice
Change-Id: I008ac7099c815fb74a9ab374419617b336453f97
2011-03-16 23:00:59 -07:00
Tadashi G. Takaoka 071f47140c Refactor BinaryDictionary a bit
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
2011-03-16 19:46:19 -07:00
satok bcfce3b3b9 Add whitelist dictionary
Bug: 3447571

Change-Id: I538e4e706982129b666ca1ab1085f1b68b69f87f
2011-03-08 11:29:10 +09:00
Ken Wakasa baf263caf4 Fix a NPE caused by a null typedWord
bug: 3514797
Change-Id: Ie1056745ded1f848d1e4f70c5344d6969de509b0
2011-03-05 12:50:58 +09:00
satok dca305dd71 Merge "Move the auto correction functionalities to AutoCorrection.java" 2011-03-03 02:58:06 -08:00
satok 9f67e12a0e Move the auto correction functionalities to AutoCorrection.java
- Also removed a quick fix for 2nd or more suggestions.

Change-Id: I7bf46a9cd6a727473e68836954fca160c9d853e6
2011-03-03 19:51:10 +09:00
Tadashi G. Takaoka 4503e2ea98 Hide shortcut key when the shortcut IME is not enabled
Bug: 3398726
Change-Id: I5e1bfc1fec9047c1c4e4f29fbf79f0fdf9356ffb
2011-03-03 01:18:08 -08:00
Tadashi G. Takaoka 424f6ec2bc Continue swapping sentence separator and space
Bug: 3504990
Change-Id: I3de44e9d9adb0bcafa2e59685c4cdc257716b1d6
2011-03-02 22:26:44 -08:00
Tadashi G. Takaoka 662bb7c26c Refactor TextEntryState not to use enum
Bug: 3504990
Change-Id: Id1ae9715d9f9ba99702e4cd5c243026a84d6861d
2011-03-02 22:11:52 -08:00
Tadashi G. Takaoka 1eff7d77c8 Remove mIsApplicationSpecifiedCompletions flags from SuggestedWords
Bug: 3504990
Change-Id: Ib7588ab05fa8b8ab58bf3bea6ff1f644c53ebb94
2011-03-02 22:03:29 -08:00
Tadashi G. Takaoka e59491460b Remain in previous state while sliding off from shift key
Bug: 3502290
Change-Id: I69b60051863c78727363ae63576c28d87fb71a3a
2011-03-02 14:59:39 -08:00
Tadashi G. Takaoka 6f99d12b07 Enable re-correction even after revert auto-correction
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
2011-03-02 11:14:04 -08:00
Tadashi G. Takaoka 8bf93c4ba5 Merge "Introduce timeout for "." shortcut" 2011-03-01 23:59:14 -08:00
Tadashi G. Takaoka fc20f2198d Introduce timeout for "." shortcut
Bug: 3294239
Change-Id: I1832be8b54cd4d55cd504a3e1e0434aa284f9592
2011-03-01 23:57:51 -08:00
Ken Wakasa 7e99a28dfc Clear suggestion strip when the suggestion starts
bug: 3488704
bug: 3480132

Change-Id: Ie895d2ad1b58dc65fe16d65baa6fccafd4a142bb
2011-03-02 16:40:08 +09:00
Ken Wakasa 18e15a1e5e Fix null token error
bug: 3499746
Change-Id: I76bd745b0623f4736c6b0aaf0ab42fd4b7c4f349
2011-03-02 07:20:27 +09:00
Ken Wakasa 025a5e356e Reset the suggestion status when composing span gets cleared
bug: 3353818

Change-Id: I87b80470015dbeb2eaaec9aa4d9d802597c18e19
2011-03-02 04:30:03 +09:00
Ken Wakasa 952cb7e973 Refactor recorrection variable and method names
Change-Id: I3cb76e622e33985a187afe0a8928ed7b261615fd
2011-03-01 15:59:06 +09:00
Ken Wakasa eaef1c5007 Change how to load native lib to be on the safe side
Change-Id: If170d4821b8dbc187f29137ea99d10e30c20955f
2011-02-25 18:21:02 +09:00
Tadashi Takaoka 52e96f1e89 Merge "Added support for speaking keys through accessibility service." 2011-02-24 17:45:44 -08:00
Tadashi G. Takaoka d77e968942 Merge "Add noSettingsKey private IME option" 2011-02-23 23:48:45 -08:00
Tadashi G. Takaoka 6b05d482f4 Merge "Fix AutoText enabling timing" 2011-02-23 23:47:58 -08:00
Tadashi G. Takaoka 4199e29a7d Add noSettingsKey private IME option
Change-Id: Idf74aa32c9ea565fa6771013e2d37ee952c83a57
2011-02-24 16:31:20 +09:00
Tadashi G. Takaoka 2702334165 Fix AutoText enabling timing
Bug: 3479978
Change-Id: Ic3a9e947536b1508eb2bbe45753d6f7c0e99e416
2011-02-24 16:18:24 +09:00
Jean Chalard fdc4b08309 Merge "Allow the user to save words when there is no binary dictionary." 2011-02-23 19:18:10 -08:00
satok 10c169a44d Merge "Add proximity info to native" 2011-02-23 18:28:14 -08:00
Jean Chalard 7f2ba16aa2 Allow the user to save words when there is no binary dictionary.
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
2011-02-24 11:20:21 +09:00
Alan Viverette dcade18113 Added support for speaking keys through accessibility service.
Issue: 3366636

Change-Id: I70a2ebb4420782ba4d7d874ffc2259bb1b80446f
2011-02-23 18:16:43 -08:00
satok 8fbd552292 Add proximity info to native
Bug: 3311719

Change-Id: Ie596304070e321ad23fb67a13bf05e2b6af1b54b
2011-02-23 23:04:00 +09:00
Tadashi G. Takaoka 8efc0addce Fix privateImeOptions parsing
This change deprecates "nm" private IME options and introduces new
private option, <package name>.noMicrophone, instead.

Change-Id: I9d5e3daaead2cdd42e017cd29f5f786ef3ba3649
2011-02-23 20:00:08 +09:00
Tadashi G. Takaoka cb97c2f140 Refactor keyboard mode holding variables
Change-Id: Id8d4e780a98292fda63b1e5bbf739eda78935a3b
2011-02-23 14:17:10 +09:00
Tadashi G. Takaoka 050c0462dc Display language name on spacebar even in symbol keyboard.
Bug: 3468634
Change-Id: I1a25eb71ddbd7efae6f40ea357714924a9d56dc4
2011-02-20 21:16:49 +09:00
Tadashi G. Takaoka 4b13b4f942 Add "passwordInput" attribute to case tag of Keyboard
This change also introduces number password (a.k.a. PIN) layout. The
text password layout will follow.

Bug: 3384942
Change-Id: I50b5e413e47a28d5285fd0468115e11ce46c7f18
2011-02-20 18:46:48 +09:00
satok 290b4a8ff9 Merge "Not to make a thread at changing view from keyboard to voice" 2011-02-17 01:45:28 -08:00
satok 060efb6d82 Not to make a thread at changing view from keyboard to voice
Change-Id: If3f89b3e9774c566a1bb2119b161c42b715e6709
2011-02-17 17:45:46 +09:00
Ken Wakasa eebbe54113 Merge "Fix password variation check code" 2011-02-16 22:00:01 -08:00
Ken Wakasa 16ee377bcd Fix password variation check code
Change-Id: Id994112a029982b4dabd6ebca34edd1d787e5ae2
2011-02-17 14:44:44 +09:00
Tadashi G. Takaoka 887f11ee43 Remove next letters frequency handling
Bug: 3428942
Change-Id: Id62f467ce4e50c60a56d59bf96770e799a4659e2
2011-02-17 13:59:41 +09:00
Jean Chalard a7b2ac26ee Remove a useless flag.
This has become useless when LatinIME stopped being a
SharedPreferenceListener.

Change-Id: I708ec3c3a299ead18548c85b435b45558c984e8d
2011-02-15 17:15:13 +09:00
Jean Chalard 9a5d2ba03e Stop listening on shared preferences change.
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
2011-02-10 16:34:58 +09:00
Tadashi G. Takaoka 39c323eb12 Merge "Move and rename computeProximityThreshold" 2011-02-08 00:05:27 -08:00
Jean Chalard f0d99b8677 Make the keyboard sound on by default for xlarge screens.
Also change the name of the default value for re-correction for
consistency with other constant names.

Bug: 3426884

Change-Id: I615ba640fb17e6d7514b8a0e4f52028eb0e23908
2011-02-08 12:44:03 +09:00
Tadashi G. Takaoka 5ef096f5f6 Move and rename computeProximityThreshold
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
2011-02-08 11:43:39 +09:00
Jean-Michel Trivi cf675cc808 am 78f9ee97: am 985fb645: Revert I871cfaaf Latin IME Keyboard sounds off by default
* commit '78f9ee978a6a3e8a78ae161034c273d4c8600f6f':
  Revert I871cfaaf Latin IME Keyboard sounds off by default
2011-02-07 13:49:56 -08:00
Jean-Michel Trivi a428945d90 am 2fb80292: am 435ea0f5: Fix bug 3426884 Latin IME Keyboard sounds should be on by default
* commit '2fb802922e76f20bfb21c0b988bab4a67c56161d':
  Fix bug 3426884 Latin IME Keyboard sounds should be on by default
2011-02-07 13:49:43 -08:00
Jean-Michel Trivi 985fb645ef Revert I871cfaaf Latin IME Keyboard sounds off by default
Change-Id: If4b90daa04df0b554faf2886fe83410e086e5b9c
2011-02-04 17:44:17 -08:00
Jean-Michel Trivi 435ea0f5dc Fix bug 3426884 Latin IME Keyboard sounds should be on by default
Change the default value when retrieving the PREF_SOUND_ON property
 from the Settings from false to true.

Change-Id: I871cfaaf1f33b5e0301c84ee9c94f1c429901021
2011-02-04 16:42:46 -08:00
Tadashi G. Takaoka ea55bf5df7 Fix menu option dialog order
Change-Id: Iea619d26a2f2091b71182face2f6a66d188e0287
2011-02-03 15:56:01 +09:00
Jean Chalard 728115493e Do not read the pop up setting if the config says not to.
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
2011-01-31 15:45:24 +09:00
satok 14e427d5bb Fix safety net not to be enabled at aggressive autocompletion mode
Bug: 3374359

Change-Id: I7b1dbeb64a87dda05397c236bb58da292f819471
2011-01-27 13:09:27 +09:00
Tadashi G. Takaoka 5c35e4109f Merge "Fix BroadcastReceiver leakage in SubtypeSwitcher" into honeycomb 2011-01-26 09:07:44 -08:00
Tadashi G. Takaoka 123c4a3851 Fix BroadcastReceiver leakage in SubtypeSwitcher
Bug: 3345931
Change-Id: If31a6e803ea7e1a857085ced354722c484fda075
2011-01-27 01:49:44 +09:00
Ken Wakasa b5e00d5841 Fix NPE in isCandidateStripVisible()
Change-Id: I03d3c4806b51e7f902c43887a6769bffbffeccaf
2011-01-27 01:33:02 +09:00
Ken Wakasa aa0458f917 Fix Input options dialog
bug: 3387860
Change-Id: I81e57ca08e07e4c2a68196ca173b764c40fbeb17
2011-01-26 02:56:09 +09:00
Ken Wakasa 6d0ff1d070 Merge "Revert "Implement callback to handle touch event outside SoftInputWindow"" into honeycomb 2011-01-25 05:42:22 -08:00
Tadashi G. Takaoka 00eb365873 Revert "Implement callback to handle touch event outside SoftInputWindow"
This reverts commit de59a84029 (Ie8d4469b).

The requested feature has been implemented by I92d98bed.

Bug: 3238092
Change-Id: I9d53030b3d5c9a0f24883292a93576a3231813aa
2011-01-25 19:27:10 +09:00
Tadashi G. Takaoka 85996b472a Reuse language_selection_title string resource for option dialog
Bug: 3385831
Change-Id: I23f587815f7fca3190bd0aa669bb6a2378d34ea8
2011-01-25 11:48:06 +09:00
Tadashi G. Takaoka 603e72baa2 Merge "Implement callback to handle touch event outside SoftInputWindow" into honeycomb 2011-01-24 01:44:28 -08:00
Tadashi G. Takaoka de59a84029 Implement callback to handle touch event outside SoftInputWindow
Bug: 3238092
Change-Id: Ie8d4469bc2c6880bdf2a0c4e4eec68bb136b837c
2011-01-24 17:34:05 +09:00
satok 910b73127f Add log for voice IME
Change-Id: I7d0a458b3cf41fc9dc679f654347e8870c75185d
2011-01-24 15:08:07 +09:00
satok 3d012a57db Merge "Fix touchable region" into honeycomb 2011-01-21 02:59:49 -08:00
satok 9e347d3d44 Fix touchable region
Bug: 3238092

Change-Id: Ie2087086af90ba51e0e310f9e46964e450561cbe
2011-01-21 19:45:32 +09:00
Tadashi G. Takaoka f3df63a93a Update suggestions if user typed word is found in dictionary
This change aslo eliminates duplicate suggestion from past
suggestions.  And call setTypedWordVaild to past suggestions.

Bug: 3367722

Change-Id: I7ffaa2f7e4e30b3951b6c2df002d269671c9d654
2011-01-21 15:52:35 +09:00
satok 15a7e837ab Merge "Dim previously suggested words" into honeycomb 2011-01-20 22:22:13 -08:00
satok 6f7218627e Dim previously suggested words
Change-Id: Id673c03bfa22ea9ce1bedb5174d8309a37a2a460
2011-01-21 15:20:21 +09:00
satok 58d6d0615d Disable touchable region until we come up with correct implementation
bug: 3373640

Change-Id: I22448b779b0adc60f590aaef916075c7847dcdc9
2011-01-21 14:41:20 +09:00
Tadashi G. Takaoka a2ad96d959 Make settings dialog cancel-able by touching outside
Bug: 3374426
Change-Id: I6ba9b82d4481c43c78b59e78dcf22cd9875a8240
2011-01-21 14:07:05 +09:00
Tadashi G. Takaoka 2fa21f5854 Add input method subtype selector and IME settings dialog
Bug: 3351762
Change-Id: Ic1767faac6d4470a89cacb851d449ac53b2f8205
2011-01-21 02:30:52 +09:00
satok 6845da8d7b Add touchable region
Bug: 3238092

Change-Id: I3cda3106a61c40c3b66741dc38c9ff4cc55f487b
2011-01-20 22:04:42 +09:00
Jean Chalard 89764ad4ac Simplify text correction settings in latin IME.
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
2011-01-19 20:08:46 +09:00
satok 82411d47ba Add a safety net for auto-correction.
Bug: 3353956

Change-Id: I6a32632b2f986f0d9a07aa72f256a2c41cc09873
2011-01-19 17:54:22 +09:00
Jean Chalard 8b0febc6f0 Merge "Simplify latin IME settings page." into honeycomb 2011-01-18 19:08:15 -08:00
Luca Zanolin bbd651a008 Change the UI of Voice IME to be more like Voice Search.
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
2011-01-18 15:49:17 +00:00