Commit Graph

10863 Commits (a6bfeb61f808971536d28a5eebdf4c2706e815d2)

Author SHA1 Message Date
Tadashi G. Takaoka dc0c1e40be Merge "Add EmojiPageKeyboardAccessibilityDelegate" 2014-06-10 22:36:02 +00:00
Tadashi G. Takaoka e9d9b37b5a Add EmojiPageKeyboardAccessibilityDelegate
Because EmojiPageKeyboardView doesn't use PointerTracker to handle
MotionEvent, a dedicated accessibility delegate is needed. Then the
recent tab can be updated even with accessibility mode on.

Bug: 15582599
Change-Id: I63d75b9aca21ec44f1f77d2eaaf2ba7813992183
2014-06-13 13:35:35 +09:00
Jean Chalard 8a23703763 Merge "[CM1] Let predictions be aware of capitalize mode." 2014-06-10 22:31:57 +00:00
Tadashi G. Takaoka 163f318545 Merge "Return an empty accessibility node info for a keyboard" 2014-06-10 22:31:57 +00:00
Tadashi G. Takaoka 9934740a5f Return an empty accessibility node info for a keyboard
Because a keyboard handling hover events and determining a virtual
node by itself, there is no need to supply whole virtual nodes info
for the keyboard. Just returning an empty accessibility node info
supresses annoucements of all keys.

This CL also fixes the undefined virtual id value.

Bug: 15582251
Change-Id: Ie033d21ef878d272417cf2b20f8eec1e516587f6
2014-06-13 16:44:59 +09:00
Tadashi G. Takaoka 03eba0927d Merge "Use MoreKeysDetector for accessibility" 2014-06-10 22:31:57 +00:00
Tadashi G. Takaoka 68b8a2d86c Make accessibility long press timeout longer
The previous time out was 1500 milliseconds that wasn't enough for
announcing some accented letters, for example "Ü". This CL makes the
time out to 3000 milliseconds.

BUG: 15582951
Change-Id: I9bf864389c359e3b9abfe5000b897cf742a8dbe7
2014-06-13 13:02:24 +09:00
Tadashi G. Takaoka 1dbeb251b2 Use MoreKeysDetector for accessibility
A more keys keyboard may have a divider on it. The MoreKeysDetector
should be used even with accessibility mode on to be able to handle a
divider.

Bug: 15583354
Change-Id: Ife2cf8304496c4c330127fde8ca1f34c2f0838e2
2014-06-13 12:49:49 +09:00
Keisuke Kuroyanagi 6aa64e91ed Merge "Add clearContextualDictionary()." 2014-06-10 22:29:12 +00:00
Keisuke Kuroyanagi 60dad15f12 Add clearContextualDictionary().
Change-Id: Ia2f8d5640cde816cca23b26ee261acf44f3cdcdc
2014-06-16 17:01:14 +09:00
Keisuke Kuroyanagi 356539699a Add a method to update contextual dictionary.
Bug: 14161647
Change-Id: I2111f841c94e31d62b670da4236fc738df03a708
2014-06-16 17:00:12 +09:00
Keisuke Kuroyanagi 1a4d815b0b Contextual dictionary updater.
Bug: 14161647
Change-Id: I8106419678d5d26a4debec7bbef43af079c1ab18
2014-06-13 18:39:29 +09:00
Keisuke Kuroyanagi d7a22c8439 Personalization dictionary updater.
Bug: 14161647
Change-Id: I7ab3d701525e9a19bc100aa577527e332bb2ad95
2014-06-13 16:31:12 +09:00
Keisuke Kuroyanagi ec59371ff8 Merge "Block offensive words in native code." 2014-06-10 22:36:02 +00:00
Keisuke Kuroyanagi 59ed0c2db2 Block offensive words in native code.
Bug: 15300452

Change-Id: Ic6c91c47453e19fb5db2c62b66659619e72b1ecf
2014-06-12 11:36:00 +09:00
Keisuke Kuroyanagi 17f03583c8 Merge "Add a method to update contextual dictionary." 2014-06-10 22:31:57 +00:00
Keisuke Kuroyanagi a4f2e8eee0 Merge "Contextual dictionary updater." 2014-06-10 22:31:57 +00:00
Yohei Yukawa c1cb930dde Merge "Revert "Check OS codename for shouldOfferSwitchingToNextInputMethod"" 2014-06-10 22:29:12 +00:00
Yohei Yukawa 58e248ebda Revert "Check OS codename for shouldOfferSwitchingToNextInputMethod"
This reverts commit 1690992d1b.

Build.VERSION.SDK_INT is bumped with I4716e71d72b2526fe635079d1b.                                                                                     
We no longer need this workaround.

Change-Id: I75a1c2a7055af17a7d40291aadd62ae9bb42e056
2014-06-13 03:12:17 +00:00
Tadashi G. Takaoka a68e0dd437 Fix NPE by disabling key preview popup of Emoji palette
Bug: 15579928
Change-Id: I6bcf885f2c1aa37b337a85978409ccf41e459c2a
2014-06-13 11:04:56 +09:00
Keisuke Kuroyanagi da0ea7603b Merge "Add jni method for removeUnigramEntry()." 2014-06-10 22:31:57 +00:00
Keisuke Kuroyanagi b4d77eca55 Add jni method for removeUnigramEntry().
Bug: 15552347
Change-Id: Iadcdc73d3335d561a27b9314d3fcdab0b0c96e49
2014-06-12 12:21:44 +09:00
Keisuke Kuroyanagi 81bd7e2007 Merge "Personalization dictionary updater." 2014-06-10 22:29:12 +00:00
Tadashi G. Takaoka 08199ec859 Clear PointerTracker state when more keys keyboard is dismissed
With accessibility mode on, hover events for a more keys keyboard are
handled among MoreKeysKeyboardAccessibilityDelegate and
MoreKeysKeyboardView. But the more keys keyboard is shown by
MainKeyboardAccessibilityDelegate that uses PointerTracker to handle
hover events. Thus we need to clear PointerTracker state when the more
keys keyboard is dismissed.

This is a workaround to resolve the issue. We should reconsider the
structure of those views and accessibility delegates in the future.

Bug: 15583751
Change-Id: Ida8c3e55194c59bdaa5bc4ff06068e699b888ced
2014-06-13 15:54:25 +09:00
Keisuke Kuroyanagi 4715baf93b Merge "Fix: Wrong name for ContextualDictionary." 2014-06-10 22:29:12 +00:00
Keisuke Kuroyanagi 3bedb9b3e6 Fix: Wrong name for ContextualDictionary.
Bug: 15557070
Change-Id: I5796df54a74c111d361da8c548e5597aba8e24d0
2014-06-11 19:58:22 +09:00
Tadashi G. Takaoka 6a96c508fd Fix logic to show suggestions
Bug: 15531465
Change-Id: Ic7fe5743ad3767cdaed699e5e2d1ebcaa75e22c2
2014-06-11 11:51:58 +09:00
Keisuke Kuroyanagi 447c19364a Merge "Enable Beginning-of-Sentence prediction for contextual dict." 2014-06-10 22:31:57 +00:00
Keisuke Kuroyanagi 22931cd941 Enable Beginning-of-Sentence prediction for contextual dict.
Bug: 14161647
Bug: 14119293
Change-Id: I0c00f13966db88e4de85e245e7bced43c9d474b2
2014-06-12 12:26:18 +09:00
Baligh Uddin 6b655de1a6 Merge "Import translations. DO NOT MERGE" 2014-06-10 17:21:28 +00:00
Baligh Uddin 5092fe6315 Merge "Import translations. DO NOT MERGE" 2014-06-10 17:21:23 +00:00
Jean Chalard d979d416c1 Merge "Special case periods in the spell checker" 2014-06-10 11:57:21 +00:00
Keisuke Kuroyanagi cdfd2ce5a3 Merge "Add prefix to the arguments of getDictionary()." 2014-06-10 11:41:34 +00:00
Tadashi G. Takaoka 5bf7418fad am 278b9071: Rename keyboard theme Quantum to Material
* commit '278b9071ab036f20d29dc651ddd79136c5f84e33':
  Rename keyboard theme Quantum to Material
2014-06-10 11:18:43 +00:00
Keisuke Kuroyanagi f36da2fdba Merge "Make dump dictionary settings easily extensible." 2014-06-10 11:08:38 +00:00
Keisuke Kuroyanagi a20432479d Make dump dictionary settings easily extensible.
This adds "Dump contextual dictionary".

Bug: 14161647
Change-Id: I41a6d6e131d9d8c300ac0120d903d46d88bb3346
2014-06-10 19:59:19 +09:00
Jean Chalard 4863a06544 Special case periods in the spell checker
Special case <valid word>.<valid word> to send as a suggestion
the same string where the periods is replaced by a space.

Bug: 10780091
Change-Id: I43c94675977f9ab5d7ee5671486cb742b39f3974
2014-06-10 19:52:58 +09:00
Keisuke Kuroyanagi 48b0074349 Merge "Purge dict reading code for 401 and create for 402." 2014-06-10 10:31:05 +00:00
Keisuke Kuroyanagi 07e1412631 Purge dict reading code for 401 and create for 402.
Change-Id: Ib0150b3306bb2db8aff443d1158fecc8464cbbdb
2014-06-10 19:22:40 +09:00
Keisuke Kuroyanagi 18df192535 Add prefix to the arguments of getDictionary().
Bug: 13630847
Change-Id: Ib4513b8cb6981e01dd33fd9703cc01646a2c7ccc
2014-06-10 18:05:10 +09:00
Jean Chalard 2d7feb5ad0 Merge "Split the sentences into words ourselves" 2014-06-10 08:18:36 +00:00
Jean Chalard 1efc95df7d Merge "Update dictionaries" 2014-06-10 05:34:03 +00:00
Keisuke Kuroyanagi 1ffb7cd448 Merge "Debug log when failed to add/remove n-gram entry." 2014-06-10 05:14:23 +00:00
Jean Chalard 267a8614a0 Update dictionaries
>>> dictionaries/en_GB_wordlist.combined.gz
Header :
  date : 1400639634 <=> 1402373154
  version : 45 <=> 47
Body :
Shortcut added: lust list 15

>>> dictionaries/en_US_wordlist.combined.gz
Header :
  date : 1400750526 <=> 1402373154
  version : 45 <=> 47
Body :
Shortcut added: lust list 15

>>> dictionaries/en_wordlist.combined.gz
Header :
  date : 1400639659 <=> 1402373178
  version : 45 <=> 47
Body :
Shortcut added: lust list 15

>>> java/res/raw/main_en.dict
Header :
  date : 1400639659 <=> 1402373178
  version : 45 <=> 47
Body :
Shortcut added: lust list 15

Bug: 15347469
Change-Id: I35cb410bdb7b641f2f0d4d9bb19a17e3f4eb9c0b
2014-06-10 14:08:32 +09:00
Keisuke Kuroyanagi 354a59dfa4 Debug log when failed to add/remove n-gram entry.
Change-Id: Ibf0a4e01e1abc81b09aec104ba39d2ec18f4db8b
2014-06-10 13:04:57 +09:00
Jean Chalard e689d37f72 Remove a useless method
Change-Id: I21a4219f682f43f4a84b1ab12d00dd930b35caa1
2014-06-10 12:47:55 +09:00
Jean Chalard 264afb10bd Merge "Remove mPrevWordsInfo" 2014-06-10 03:21:47 +00:00
Jean Chalard 367c199de1 Remove mPrevWordsInfo
This member has outlived its usefulness. It's not clear now that it
makes things really faster, but it does bring a lot of complexity
that we can avoid by removing it.

Change-Id: Ifbc8094a45b56b958fe165b1930f4cc358a97721
2014-06-10 12:07:51 +09:00
Baligh Uddin 5f5b5bf6bb Import translations. DO NOT MERGE
Change-Id: I12199bc91f977541d1ca0293bf02ab4f7716041b
Auto-generated-cl: translation import
2014-06-09 17:27:48 -07:00
Baligh Uddin 47b956e37a Import translations. DO NOT MERGE
Change-Id: I619995358078fd20eb65070a85c78d483521760b
Auto-generated-cl: translation import
2014-06-09 17:22:26 -07:00
Tadashi G. Takaoka 874a600dc8 Add audio and haptic feedback for Emoji and Suggestions
Bug: 15378862
Change-Id: Ia14929bd9eb63ad5735cae0ad98ad0e2ad301128
2014-06-10 09:15:59 +09:00
Tadashi G. Takaoka d022df49bd Merge "Set content descrition of words in suggestions strip" 2014-06-09 13:01:44 +00:00
Tadashi G. Takaoka f3c852efad Set content descrition of words in suggestions strip
Bug: 14849593
Change-Id: If020e2352c8e950ce87dc4711c39b8a6a41f66fc
2014-06-09 21:40:36 +09:00
Jean Chalard 43ea8f6e77 Merge "Use RichInputConnection to get the previous word." 2014-06-09 10:47:28 +00:00
Jean Chalard 453711abe2 Use RichInputConnection to get the previous word.
We don't need the optimization of storing the old words now
that the RichInputConnection can supply it without IPC.

Bug: 13703802
Change-Id: I37ccb8d5fba879fb04b4f23d33571849736d897c
2014-06-09 19:43:20 +09:00
Jean Chalard 7a6bc607ca Split the sentences into words ourselves
The framework's default split is not suitable for all
languages. Also it does not perform very well when space
is mistyped as period.

Bug: 9063355
Bug: 10780091
Change-Id: I400d790ff1c29f221697fd94d79bbf67c61c7b8a
2014-06-09 19:38:03 +09:00
Tadashi G. Takaoka 48b96a6a52 Fix TalkBack descriptions of keyboard shift mode transition
Bug: 14846348
Change-Id: I32435a31f919974a506e598d1f3cc1b55a0866ae
2014-06-09 17:28:49 +09:00
Tadashi G. Takaoka 402e847477 Merge "Use rectangle region to ignore hover events after long press" 2014-06-09 07:56:41 +00:00
Tadashi G. Takaoka 862d7ec32e Merge "Refactor KeyCodeDescriptionMapper class a bit" 2014-06-09 07:56:28 +00:00
Tadashi G. Takaoka 176f803176 Use rectangle region to ignore hover events after long press
Bug: 15500282
Bug: 15501718
Change-Id: Ia4771198c3120a980b0a2cdd210928a4f47f5b83
2014-06-09 16:32:19 +09:00
Tadashi G. Takaoka 24fab555f9 Refactor KeyCodeDescriptionMapper class a bit
This CL adds getDescriptionForCode() method.

Bug: 15500282
Change-Id: I3bb92c8f356ea623fc992c924506b11e09256e98
2014-06-09 16:28:30 +09:00
Keisuke Kuroyanagi 7f0316c27e Merge "Add distracter cache to optimize the distracter test." 2014-06-09 05:35:46 +00:00
Keisuke Kuroyanagi 9f02a67c77 Merge "Fix: NPE after turning on personalized suggestion." 2014-06-09 05:35:32 +00:00
Keisuke Kuroyanagi 104b582c35 Add distracter cache to optimize the distracter test.
Bug: 13142176
Bug: 15428247
Change-Id: Ia390b148ffb36ace6c2010daf0f14838492413e8
2014-06-09 12:39:06 +09:00
Keisuke Kuroyanagi 65cf23eb38 Fix: NPE after turning on personalized suggestion.
Bug: 13142176
Bug: 15428247
Change-Id: I236202e3c1b70a11d512c946798035087945c0ac
2014-06-09 12:26:59 +09:00
Keisuke Kuroyanagi a2a4ee2765 Merge "Check isInDictionary() before the distracter test." 2014-06-09 02:53:33 +00:00
Keisuke Kuroyanagi bdf745da32 Check isInDictionary() before the distracter test.
Bug: 13142176
Bug: 15428247
Change-Id: I7ce2c09ebbef6ca8c056807c2a35f2f987fd436e
2014-06-09 11:43:45 +09:00
Keisuke Kuroyanagi 79e2e9fa8c Merge "Add Dictionary.isInDictionary()." 2014-06-09 02:40:39 +00:00
Tadashi G. Takaoka 278b9071ab Rename keyboard theme Quantum to Material
Bug: 15467097
Change-Id: Id909723cd979ccd24740b034720591c9b1bcc2b1
2014-06-09 11:37:45 +09:00
Keisuke Kuroyanagi 1910392eed Add Dictionary.isInDictionary().
Bug: 13142176
Bug: 15428247
Change-Id: If2d1c1fea7a69e41809a828da8dd032211ad144e
2014-06-09 11:04:28 +09:00
Tadashi G. Takaoka dec599d172 Fix overwriting accessibility delegate in setKeyboard
A keyboard accessibility delegate object should be a singleton for
each keyboard view.

Bug: 15437933
Bug: 15419386
Change-Id: Ia70853c644d950ea6130c1f209b89929b1cb1ee5
2014-06-08 22:12:52 +09:00
Baligh Uddin 86a28db7f9 Merge "Import translations. DO NOT MERGE" 2014-06-07 04:21:24 +00:00
Baligh Uddin 42e341386d Merge "Import translations. DO NOT MERGE" 2014-06-07 04:21:20 +00:00
Alan Viverette 3f736107e2 Material theme
BUG: 15467097
Change-Id: I1b6ed80d85e4c3c8913d4a9e08c519379cb3c6e0
2014-06-06 15:22:57 -07:00
Alan Viverette ceb6e38c15 DO NOT MERGE Material theme
BUG: 15467097
Change-Id: I1b6ed80d85e4c3c8913d4a9e08c519379cb3c6e0
2014-06-06 14:15:07 -07:00
Tadashi G. Takaoka 2385314be0 Merge "Refactor logic to determine showing suggestions strip or not" 2014-06-06 10:48:00 +00:00
Keisuke Kuroyanagi 7640bb1505 Merge "Make Distracter filter use getMaxFrequencyOfExactMatches()." 2014-06-06 10:44:04 +00:00
Tadashi G. Takaoka 987bff9136 Refactor logic to determine showing suggestions strip or not
The logic to determine when the suggestions strip (a.k.a. the
contextual strip) should be shown is already complex. In addition to
that the voice input key get shown on the strip as well. There are a
several factors to be considered and a few things to control.

- The password input field shouldn't have the strip.
- Show voice input key on the strip or not.
  - User preference settings "Show Voice Input Key".
  - A voice IME exists and is enabled.
  - The input field may have a private IME option to prevent the voice
    input key from being displayed.
- Application can specify auto completions.
  - Full screen mode or not.
- User preference settings "Show correction suggestions".
  - Always show, Show in portrait mode, Always hide.
- The input field may have flags to prevent showing suggestions or
  auto corrections.
- Suggestions is empty or not.
- An important notice may be shown.

Bug: 14981852
Bug: 15436479
Change-Id: I3050fd53ee6271fc64a8f17b6b12d9581d37b750
2014-06-06 19:41:21 +09:00
Keisuke Kuroyanagi 166d8c2293 Make Distracter filter use getMaxFrequencyOfExactMatches().
Bug: 13142176
Bug: 15428247

Change-Id: I5c23fbea2851f891f76f19d9da2cb70ae964569b
2014-06-06 19:38:44 +09:00
Keisuke Kuroyanagi 8cae9f50b4 Merge "Implement getMaxProbabilityOfExactMatches()." 2014-06-06 08:39:40 +00:00
Keisuke Kuroyanagi d9b8602f48 Implement getMaxProbabilityOfExactMatches().
Bug: 13142176
Bug: 15428247
Change-Id: I5be6d683be95505412615ca7c88260de1ea05f54
2014-06-06 17:37:46 +09:00
Tadashi G. Takaoka d66d16f650 Update shift key backgrounds for LXX_Dark
Bug: 15310025
Change-Id: I2fa267e5c448e28435f4737666a03b40f1f4a4d5
(cherry picked from commit 0621dd1d3c)
2014-06-06 07:48:43 +00:00
Jean Chalard 6464d73ad9 Merge "When starting input, include the literal word in suggestions" 2014-06-06 07:27:40 +00:00
Tadashi G. Takaoka bd3b20ce73 Merge "Always update voice key visibility" 2014-06-06 07:14:28 +00:00
Jean Chalard fca2c4b439 When starting input, include the literal word in suggestions
This change also includes a fix that has suggestions re-computed
when the typed word is included but no prior suggestions were
found in spans.

Bug: 2349475
Change-Id: Ic06e6ac492507126ffc1e96a5f396c971b567272
2014-06-06 16:00:18 +09:00
Jean Chalard eb771b9dc4 Merge "Fix a small bug with rotation." 2014-06-06 06:34:00 +00:00
Jean Chalard c69ba5630d Fix a small bug with rotation.
Bug: 2349475
Change-Id: Id4aa5ce56b1a545e4cb88ca1b01cf24642deade2
2014-06-06 14:06:29 +09:00
Tadashi G. Takaoka aa4b2c7127 Always update voice key visibility
Bug: 15128166
Change-Id: Ie15724c323efa3b102f6aebddc3bda210aad1727
2014-06-06 13:18:41 +09:00
Tadashi G. Takaoka 3ca65c8fd5 Remove unused supportsSwitchingToShortcutIme attribute
Change-Id: I51c5247ac925a158facb79057f704b763b903552
2014-06-06 13:11:57 +09:00
Tadashi G. Takaoka b7206b6bca Merge "Add action key test for Lxx theme" 2014-06-06 04:08:40 +00:00
Tadashi G. Takaoka c5dc740673 Add action key test for Lxx theme
Change-Id: I849cec7deb5607e8ce8fb25c1f903f15328fb611
2014-06-06 12:56:57 +09:00
Jean Chalard 70ff0c2122 Merge "Fix a bug on rotation with selection." 2014-06-06 03:12:12 +00:00
Jean Chalard 9fd9a68d87 Fix a bug on rotation with selection.
The symptom : when text is selected and the device is rotated,
sometimes the keyboard sets the word as being composed around
the start of the selection. Upon the next rotation this ends up
with the keyboard committing some text in place of the selection.

The cause : another bug in the framework with rotation >.>
The keyboard receives a call to startInput with a wrong cursor
position, namely one that does not represent a selection. The
keyboard sets a composition according to this wrong data. When
the keyboard is rotated again, it commits the text, which takes
the place of the selection.

The solution : actually when restarting input the keyboard
realizes that the cursor position is wrong. We cancel composition
at that time.
For robustness, this change also implements two other defensive
changes : upon call to onUpdateSelection, we actually realize
that the previous values were wrong, so we also fix it at that
time, and in addition, when rotating, we finishComposingText()
instead of commitText() which is less dangerous. Implementing
this later change also allows us to let less internal variables
from InputLogic escape to LatinIME, so it's also a good change
for design.

Bug: 14140799

Change-Id: Ib10de18e53e376ac1bbc8487e13d969828483346
2014-06-06 11:18:23 +09:00
Keisuke Kuroyanagi 0ee8644666 Merge "Add getMaxFrequencyOfExactMatches() to Dictionary." 2014-06-05 10:07:59 +00:00
Keisuke Kuroyanagi d988fcc93d Add getMaxFrequencyOfExactMatches() to Dictionary.
Bug: 13142176
Bug: 15428247
Change-Id: I93b44ef40cafb6b811c68fa79f3a4971fc3916a5
2014-06-05 19:05:58 +09:00
Tadashi G. Takaoka 0dbf15f152 Merge "Rename some boolean variables for readability" 2014-06-05 09:33:05 +00:00
Tadashi G. Takaoka a12d431c86 Merge "Refactor show voice key preferece migration code" 2014-06-05 09:33:03 +00:00
Tadashi G. Takaoka 2e32e37d5b Rename some boolean variables for readability
Change-Id: I434cf507e68349b9893ac084645986d6b3d7da91
2014-06-05 18:18:46 +09:00
Keisuke Kuroyanagi d6b89e17a6 Add jni method for getMaxFrequencyOfExactMatches().
Bug: 13142176
Bug: 15428247
Change-Id: I2ae25090b67ad0c6df97dec7712e2f7e0bb08c40
2014-06-05 18:16:11 +09:00
Tadashi G. Takaoka fcaf47f007 Refactor show voice key preferece migration code
Change-Id: I4f13e85a3db1ba4adf36c596cb23827bdcf93ae7
2014-06-05 15:23:58 +09:00