Commit Graph

445 Commits (9ebba46c775f37abeb0451602cb323fd45adf33b)

Author SHA1 Message Date
Keisuke Kuroyanagi bb0eca5705 Rename PrevWordsInfo to NgramContext.
Bug: 14425059
Change-Id: Id06a71681fa8b5e589e29fba10fe5c1cfed66984
2014-09-29 10:52:18 +09:00
Keisuke Kuroyanagi bbd6a26be0 Refactoring PrevWordsInfo.
Bug: 14425059
Change-Id: I48a193b965e3055bd10a00046322c2b7b19a6232
2014-09-26 21:46:57 +09:00
Tadashi G. Takaoka 90058c3d1f Add an internal state test to ImportantNoticeUtilsTests
On some 32bit-x86 testing emulators, it seems the internal state after
clear the related settings seems like a contradiction state. This CL
adds an test to check such internal state in order to investigate what
is happening on these emulators.

Bug: 17635340
Change-Id: Iba85f06c46959b1dc22e2a9213c50c9e7e30949b
2014-09-26 12:16:54 +09:00
Tadashi G. Takaoka aaefd56661 Add !string/<resource_name> reference
This CL introduces new text reference notation !string/<resource_name>
to refer a string resource on the fly.

This notation is mainly used to represent action key labels may refer
a string in a system locale in run-time.

This notation is needed to implement Hinglish and Serbian-Latin
keyboards that need to refer its own action key labels.

Bug: 17169632
Bug: 9687668
Change-Id: I042f6bd04714e0e448cd92031730eb9fb422e6d3
2014-09-25 18:27:23 +09:00
Tadashi G. Takaoka 620bfb9bb9 am 4c4ba10b: am 71b51590: am a76e11a2: am 1f490d6c: am be4e0d0e: Fix when to show important notice
* commit '4c4ba10bbb257036d7cb6ae8a128263285b7384f':
  Fix when to show important notice
2014-09-23 16:18:45 +00:00
Tadashi G. Takaoka be4e0d0e39 Fix when to show important notice
This CL introduces a timeout duration to show an important notice
message. When the timeout has passed, the important notice message
will be suppressed without user intervention.

This CL also adds unit tests and fixes a bug in
getNextImportantNoticeTitle().

Bug: 17181982
Change-Id: If321c0060cc2f7ca14ad0631b84f4990f88bd659
2014-09-22 14:28:31 +09:00
Keisuke Kuroyanagi 845c061970 Fix unit tests.
Change-Id: I7706db4c9279488552ea5fabc16dd1dd2bc7fa05
2014-09-19 19:02:08 +09:00
Adrian Velicu 8c889784e2 Added @UsedForTesting to 'missing' methods to avoid ProGuard removing them
Bug: 16864527
Change-Id: I698a1b3e09e7e9a12722169b37f87bd51c8cbd34
2014-09-19 14:31:33 +09:00
Tadashi G. Takaoka 00e018370f Merge "(DO NOT MERGE) Fix showing important notice even at beginning of sentence" into lmp-dev 2014-09-18 22:48:10 +00:00
Sandeep Siddhartha a7c5dcdedf Merge "Add Accounts & privacy settings in LatinIME" 2014-09-18 16:49:34 +00:00
Tadashi G. Takaoka 0055d26164 Merge "Fix showing important notice even at beginning of sentence" 2014-09-18 10:01:49 +00:00
Tadashi G. Takaoka f4c7eb478f Fix showing important notice even at beginning of sentence
This is a cherry-pick of Ic72d6fecc3 from lmp-dev.

Bug: 17536096
Change-Id: Id76b8f8dc85d03bc7ed5f24800301c081a82a8d2
2014-09-18 18:51:23 +09:00
Tadashi G. Takaoka 26b3d1de7e (DO NOT MERGE) Fix showing important notice even at beginning of sentence
Bug: 17536096
Change-Id: Ic72d6fecc3241c1a9aba87b82a46750cbd69e001
2014-09-18 09:45:37 +00:00
Yohei Yukawa eddfe51b38 resolved conflicts for merge of 233a2f21 to master
Change-Id: If391cc622367dfb4448c6a5c32b82111d352d86e
2014-09-18 18:27:45 +09:00
Yohei Yukawa 5896153f93 Use Add-To-Dictionary indicator only
With this CL, the previously used commit indicator was reverted.
Instead we use the add-to-dictionary indicator only at the moment.

This CL also fixes the indicator position in bidi context.

BUG: 17335734
Change-Id: I5f7cf173ddc30876e2b01320acaff8ba4265edf6
2014-09-18 16:06:35 +09:00
Sandeep Siddhartha a4e0b6efdd Add Accounts & privacy settings in LatinIME
Also start showing the logging preference on this screen too.

This settings screen will be the container for all account
management, sync and privacy related settings

Bug: 17464068
Change-Id: Ie0806f6e8a542e9dea2834445ff7b38805207bda
2014-09-17 20:50:05 -07:00
Adrian Velicu f116f91033 Making spelling of the word "distracters" consistent
Bug: 17537869
Change-Id: Ibfc1c84aff72aeb76c9b127503369d00f3dfaceb
2014-09-17 17:32:43 +09:00
Jatin Matani 9b140f4e4f am 4d8efc97: am b41d1fcd: am d0d8f90a: Merge "Reorganize settings in Google Keyboard" into lmp-dev
* commit '4d8efc97873d12b4596c695fbcf7e72330b5253e':
  Reorganize settings in Google Keyboard
2014-09-13 02:12:24 +00:00
Tadashi G. Takaoka 3a90cb9ad0 Reorganize settings in Google Keyboard
Changes :
Input languages ->  Languages
Input preferences -> Preferences
Multi lingual Options -> Multilingual Options
Keyboard Theme -> Theme
Gesture typing preferences -> Gesture typing

**New
 Appearance
        -> Theme
        -> Custom input style

**Removed
 Multilingual options from L dynamically

Bug: 11866784
Change-Id: I07404c27868e1b087b0cafb63d2031a5b493a885
2014-09-12 02:00:26 -07:00
Yohei Yukawa 97b465044f am ead70974: am 27ccbeb4: am cd119050: Support CursorAnchorInfo in the full-screen mode
* commit 'ead70974aecd78d5bad0fa87a759f6bf82dcb503':
  Support CursorAnchorInfo in the full-screen mode
2014-09-11 17:31:47 +00:00
Yohei Yukawa cd11905022 Support CursorAnchorInfo in the full-screen mode
This CL allows to emulate the behavior of CursorAnchorInfo
in the full-screen mode to work around the limitation of
the framework.

Basically this CL copies relevant code from the framework
to LatinIME. This is actually a code duplicate which isn't
great, but probably the only way that is available right now.

Change-Id: I30bc8c3387c91c8e47252ba699cbd967d8927dad
2014-09-11 18:36:53 +09:00
Keisuke Kuroyanagi d843081193 Move case and OOV detection logic into distracter filter.
Bug: 16547557

Change-Id: I8502585976deb5e93fff3b1e0266654b8a927bda
2014-09-10 11:25:34 +09:00
Jean Chalard b526a894db Fix a bug with the Greek question mark.
Bug: 17398284
Change-Id: If49593e2c959935a183a4cd9d988407cc1160599
2014-09-08 15:33:51 +09:00
Jean Chalard 17901db691 Fix a bug where CAPS_WORDS would not be returned.
Also introduce some unit tests that would have caught the bug.

Bug: 17398284
Change-Id: Idb715b7bd2f70992d6cdf4e25ef368809382caef
2014-09-05 07:56:25 +00:00
Jean Chalard a341e7d244 Merge "[ML3] Put the locale in SuggestedWordInfo" 2014-09-02 06:40:59 +00:00
Jean Chalard 576c96af95 [ML3] Put the locale in SuggestedWordInfo
...and remove it from SuggestionResults.

Change-Id: Iae85ec7e82e2caf18cc6d7656aa46dc150707cdd
2014-09-01 20:09:32 +09:00
Keisuke Kuroyanagi fdaedb6c1d Support multiple locales in distractor filter.
Bug: 16547557
Change-Id: I4aba278eb4114e0075f3f8b38c7e132743927fa8
2014-08-29 22:29:30 +09:00
Keisuke Kuroyanagi e59f3e4fbf Use DictionaryFacilitatorLruCache for personalization.
Bug: 16547557

Change-Id: I5faba5e26d072b49c0fffcaeaf5062f9e0c2dcc0
2014-08-29 12:57:50 +09:00
Jean Chalard f95770354c Straighten the dead char implementation, take 3.
Change-Id: I4f70f6eebe076c7d2b780d25e3a2c1d3faa2edfa
2014-08-28 16:03:45 +09:00
Ken Wakasa 95c4d26994 Merge "Revert "Straighten the dead char implementation."" 2014-08-27 15:07:52 +00:00
Ken Wakasa 0ba6bcb16d Revert "Straighten the dead char implementation."
This reverts commit 5ef447aeea.

Reverting because this broke a bunch of unit tests -- https://sponge.corp.google.com/target?id=b6439742-099e-46cb-8f00-d0c602a4d9bb&target=com.google.android.inputmethod.latin.tests&searchFor=&show=FAILED&sortBy=STATUS

Change-Id: Ibbd9e11372993f62e630fd9da37158ffcf47c17a
2014-08-27 15:07:28 +00:00
Jean Chalard 4204d59864 Merge "Straighten the dead char implementation." 2014-08-27 12:54:49 +00:00
Tadashi G. Takaoka 8b5788d72b am 68a2a69a: am 37beaf15: Simplify onComputeInsets of LatinIME
* commit '68a2a69ae35352650a4c6dfc0b0c69069c4a1e1d':
  Simplify onComputeInsets of LatinIME
2014-08-27 10:44:51 +00:00
Tadashi G. Takaoka 37beaf1529 Simplify onComputeInsets of LatinIME
This CL expands SoftInputWindow to the entire screen. Thus a key
review backing view is eliminated and onComputeInsets() gets
simplified too.

Bug: 17212702
Bug: 10841052
Bug: 10541453
Change-Id: I2d859f4e4698c64cabe399000821f13bab729996
2014-08-27 19:20:38 +09:00
Jean Chalard 5ef447aeea Straighten the dead char implementation.
This now supports all cases, including cases not supported by
the framework.
Now rebased on top of the right change, and renamed

Change-Id: I7886f0dcbb86cdb4dccec09aa7c52ad339680e04
2014-08-27 17:59:39 +09:00
Jean Chalard 85ddfe1317 Revert "Revert "[ML1] Introduce RichInputMethodSubtype""
This reverts commit a63d0a8ee6.

This patch seems to be fine after all, but was submitted without its companion [ML1.1] patch causing a build breakage. Reverting the revert and submitting both at the same time seems like the right thing to do.

Change-Id: Ib8fefa40b74dcee0edb025a52dac9b35c82d49df
2014-08-25 04:42:15 +00:00
Jean Chalard a63d0a8ee6 Revert "[ML1] Introduce RichInputMethodSubtype"
This reverts commit 8ffe4bc932.

Change-Id: I9d4c98b0adfdb78b0f4d376f7691e50d1bd2228f
2014-08-22 09:40:27 +00:00
Jean Chalard 8ffe4bc932 [ML1] Introduce RichInputMethodSubtype
Bug: 11230254
Change-Id: Ic7a1bf938a5a186dcff527b556295aba2406e8b9
2014-08-22 16:34:27 +09:00
Tadashi G. Takaoka d6696ae78b Add Hinglish (hi_ZZ) subtype
Bug: 17169632
Change-Id: Ibee088d76c2b19f1d62a3c9c119452726e856ec8
2014-08-21 19:12:25 +09:00
Ken Wakasa 0b3e48fb50 DO NOT MERGE: Abolish source code overlay and introduce overridable src dir
This should make IDEs happy with appropriate source code directory
selection.

Change-Id: Ic734bd4d20aa050c688a3158b1a382ae0ac18991
(cherry picked from commit fb74ab15c1)
2014-08-20 02:56:09 +00:00
Ken Wakasa fb74ab15c1 Abolish source code overlay and inroduce overridable src dir
This should make IDEs happy with appropriate source code directory
selection.

bug: 16829244
Change-Id: Ic734bd4d20aa050c688a3158b1a382ae0ac18991
2014-08-16 03:37:54 +09:00
Keisuke Kuroyanagi a848c09485 Merge "Rename distracter filter class." into lmp-dev 2014-08-07 16:37:11 +00:00
Keisuke Kuroyanagi e05eb21826 Rename distracter filter class.
Bug: 13142176
Bug: 15531638
Change-Id: I89cef5264073eed25ffb5be10fdff731df0a3138
2014-08-08 17:01:19 +09:00
Keisuke Kuroyanagi 33ca0c80c1 Use suggestions in the distracter filter.
Bug: 13142176
Bug: 15531638

Change-Id: I609fa61fccf2a0c738726985806b7d9248eadf49
2014-08-08 17:01:16 +09:00
Keisuke Kuroyanagi 6fef4ff00d Merge "Use suggestions in the distracter filter." into lmp-dev 2014-08-07 16:56:07 +00:00
Ken Wakasa 83a96fe5c7 Initial implementation of Help & feedback
bug: 16717930

Change-Id: Iddc8e831c3f01ec7eb02ed1bc5d5e103d497e177
2014-08-08 12:58:31 +09:00
Jean Chalard ae4e203625 [SD13] Reorder an enum alphabetically
Change-Id: I907041b09e5bfce537ed4f592947b2cec8cef4ac
2014-07-30 15:58:43 +09:00
Jean Chalard 3a729d4ed8 [SD12] Add the last remaining scripts
Add scripts for Bengali, Devanagari, Kannada, Malayalam,
and Tamil.
Also include a very minor fix for Arabic.

This concludes work on:
Bug: 15840116

Change-Id: Iade313fc70030a67c68d424d8cb0cac245b883d1
2014-07-30 15:58:43 +09:00
Jean Chalard 7c5cd5ec89 [SD11] Add script checks for Myanmar, Sinhala, Thai and Telugu
Bug: 15840116
Change-Id: I1264fdeea0d4739ca0f360f4934d06e5a824d4e5
2014-07-30 15:58:43 +09:00
Jean Chalard a9c12692ed [SD10] Add script checks for Lao and Khmer
Bug: 15840116
Change-Id: Id72b739e73cb3e72f56e1872ad9d60469555e193
2014-07-30 12:02:37 +09:00
Tadashi G. Takaoka a715d7f6fd Use fragment for keyboard theme settings
Bug: 11866784
Change-Id: Ic50b6eb1bd8f2b823e2c9dfad04d8615bc910936
2014-07-29 18:19:20 +09:00
Keisuke Kuroyanagi c6862ee699 Merge "Allow adding DICTIONARY_MAX_WORD_LENGTH-length words." into lmp-dev 2014-07-25 11:19:20 +00:00
Keisuke Kuroyanagi d9a8f2a82f Allow adding DICTIONARY_MAX_WORD_LENGTH-length words.
Bug: 12725817
Change-Id: Ib9b30473ba94242a7b97ccd3b850068f596a5d17
2014-07-28 21:48:02 +09:00
Tadashi G. Takaoka 9bdcb13160 Use fragment for advanced preference screen
Bug: 16522808
Change-Id: If4a2ad7a7dfecc7019bf78ad37d93fa8f37cf21e
2014-07-28 19:24:41 +09:00
Tadashi G. Takaoka 99295c8c5f Refactor Debug settings to use SubScreenFragment
Bug: 16522808
Change-Id: I741e2fbc5f0a62c7d4ae00e603eef52cc2a6d086
2014-07-28 19:16:42 +09:00
Tadashi G. Takaoka 00b49cad9c Use fragment for text correction preference screen
Bug: 16522808
Change-Id: Ia8ce83b0e69cc8157f7b8cefcfeb863eb85ee4b4
2014-07-28 17:48:49 +09:00
Tadashi G. Takaoka 3c8a075a58 Use fragment for gesture typing preference screen
Bug: 16522808
Change-Id: Ib8c2997466bb006c6b5d4e980344507b822d0023
2014-07-28 17:45:41 +09:00
Tadashi G. Takaoka 6b71530017 Use fragment for multi lingual preference screen
Bug: 16522808
Change-Id: I0bfac43513e1fb85b5d4c07f56dd4c5b82f75ed1
2014-07-28 17:20:16 +09:00
Tadashi G. Takaoka bfcd98edc7 Use fragment for input preference screen
This CL introduces a common abstract class, SunScreenFragment, for
PreferenceFragment that implements a PreferenceScreen of the main
settings preference screen.

Bug: 16522808
Change-Id: I11fba71b5e9f96208b261e0c0314de8a41720d0f
2014-07-27 16:06:52 +09:00
Yohei Yukawa 86f36003fd Use CharSequence for spell checker to keep spans preserved
This is a ground work to take per word locale information into
consideration in the spell checker. This CL is supposed to change
no user visible behavior.

With this CL, the spell checker session is able to read span
information if necessary.

BUG: 16029304
Change-Id: Icb1e1ecdf40fe0445e14565b685b1b878b746210
2014-07-20 02:16:11 +00:00
Yohei Yukawa eac8670830 Enable StringUtils to split CharSequence like String#split
This is a groundwork for enabling LocaleSpan.

To enable LocaleSpan everywhere, we need to switch to
CharSequence from String so that Span infromation can be
preserved end-to-end.  To achieve this, we need to have
CharSequence version of String#split.

BUG: 16029304
Change-Id: I0dd103185dcf62fb1e25054a374340790e6a4678
2014-07-19 22:47:56 +09:00
Ken Wakasa e645715b25 Clean up under the util package.
- Move util classes that are unused in AOSP
- Remove unused methods

Change-Id: Ic97fd313f1e2bafd50609d42aa3a2d090b63eafc
2014-07-18 17:47:14 +09:00
Tadashi G. Takaoka 5a5ee95fae Rename ProductionFlag to ProductionFlags
Change-Id: I5da2dbf8828fa0e176e7c2496392a5f561ebfe20
2014-07-16 19:26:32 -07:00
Tadashi G. Takaoka 2dae79b196 Rename LatinImeLogger to DebugFlags
Bug: 15318007
Change-Id: Ic0268fd12865c9a692a5e7110a9beb76cb8b6d7f
2014-07-16 18:49:00 -07:00
Keisuke Kuroyanagi bb843eb223 Move getPrevWordsInfoFromNthPreviousWord to PrevWordsInfoUtils.
Bug: 14425059
Change-Id: Id37022ac6c1545d6845abfbcdb7ed47f0e250eec
2014-07-07 13:07:57 +09:00
Yohei Yukawa 513784e808 Merge "Restore additional subtypes when the package is updated" 2014-07-02 19:52:36 +00:00
Yohei Yukawa 052ec62abd Restore additional subtypes when the package is updated
With this CL, Intent#ACTION_MY_PACKAGE_REPLACED will
not only update the visibility of the setup activity but
also reconstruct additional subtypes.

This is important because the system always removes all
the additional subtypes whenever the package is updated.

BUG: 15890448
Change-Id: Ic36ea68f50b1ac89b4cbd268ee53f9a5e5d60afd
2014-07-04 20:50:00 +09:00
Yohei Yukawa 3895d7f8dc Additional subtype ID should be independent of OS-version
This CL consolidates the initialization logic for additional
subtypes so that each additional subtypes can have predictable
subtype ID regardless of OS version.

Previously subtype IDs for additional subtypes are calculated
differently depending on the running OS version with hoping it
minimizes the risk of compatibility issues.  However, it is
getting harder and harder to maintain slightly different
logic between OSes. Thus we decided to unify the logic into
that in KitKat even though it may causes some breaking changes.

Note that the actual extra values that are used to instantiate
InputMethodSubtype object are still determined on the fly
depending on the running OS version. However these actual
extra values are no longer used for the subtype ID calculation.

BUG: 16000850
Change-Id: Id3c262386a7bc7ed75966b1395a50171abe550d3
2014-07-04 15:08:58 +09:00
Yohei Yukawa 73065b778c Remove dead code to fix test failure due to NoSuchMethodError
This CL removes following methods from StringUtils, which are
no longer used since Id3c262386a7bc7ed75966b1395a50171abe550d3.
- #joinCommaSplittableText
- #appendToCommaSplittableTextIfNotExists

BUG: 16000850
Change-Id: Ibdc9b7e463a19cdfac788b24c0a6322d0c5850c5
2014-07-04 19:12:14 +09:00
Jean Chalard 0dab3171d4 [SD9] Add armenian and georgian scripts
Bug: 15840116
Change-Id: I91719e4fc2e3fe29320e4cb8b1a2f8f93c44cc4d
2014-07-01 15:01:41 +09:00
Jean Chalard 292deb632c [SD7] Actually check for script.
...also implement the check for Hebrew and Arabic.

Bug: 15840116
Change-Id: Ia6433d7d98038ade64c171be4fe4b3f094111fac
2014-07-01 15:01:22 +09:00
Jean Chalard 5f6c303f0b [HW2] Have a script for hardware keyboard
Change-Id: I3ee85867c529156374ecc17db3243a50912e760b
2014-07-01 13:37:36 +09:00
Ken Wakasa 92223c04de Merge "Revert "Move getPrevWordsInfoFromNthPreviousWord to StringUtlis."" 2014-06-26 23:14:58 +00:00
Ken Wakasa 4569a734ad Revert "Move getPrevWordsInfoFromNthPreviousWord to StringUtlis."
This reverts commit ba463c9a66 that broke the dicttool build.

Bug: 14425059
Change-Id: Ie1685587104d26e4416624747c97f6087c13388a
2014-06-27 15:07:07 +00:00
Keisuke Kuroyanagi ba463c9a66 Move getPrevWordsInfoFromNthPreviousWord to StringUtlis.
Bug: 14425059
Change-Id: I3eb24e840c165e43f68c2a60fccf9974affb57a6
2014-06-27 18:08:17 +09:00
Jean Chalard aca2ef85e1 [SD2] Add support for a new tag Feature in KeyboardLayoutSet
Bug: 15840116
Change-Id: I3abbe4ce1ae573e9c5f1a8a96dc0056e8889d507
2014-06-27 20:51:48 +09:00
Keisuke Kuroyanagi 1a2f3c4433 Merge "Move getPrevWordsInfoFromNthPreviousWord to StringUtlis." 2014-06-26 23:14:30 +00:00
Keisuke Kuroyanagi 92827b0712 Merge "Make PrevWordsInfo have multiple words' information." 2014-06-24 01:52:26 +00:00
Keisuke Kuroyanagi e708b1bc2e Make PrevWordsInfo have multiple words' information.
Bug: 14425059
Change-Id: I2bd6a872904a44b80f638a13d91a97559217cc1a
2014-06-25 14:14:37 +09:00
Jean Chalard 8d3d0f3b84 Merge "[SD1] Move script-related methods to a new utils class." 2014-06-24 01:46:27 +00:00
Jean Chalard 289299bf66 [SD1] Move script-related methods to a new utils class.
Bug: 15840116
Change-Id: I3a2a9c41e40590c0116c7885a49c6fa308ed8f44
2014-06-26 18:24:11 +09:00
Keisuke Kuroyanagi 702e153fbc Merge "Support migration/dump of Beginning-of-Sentence entries." 2014-06-24 01:59:00 +00:00
Keisuke Kuroyanagi 88fa47a27d Support migration/dump of Beginning-of-Sentence entries.
Bug: 14119293
Change-Id: Ie975138f819794d5c34a7a547be5a6117050e084
2014-06-24 12:37:07 +09:00
Jean Chalard e83e79cb05 [CS1] Some initial clean up
Bug: 13238601
Change-Id: I54ee9a85ecfee3c50c8db3eb4cd6f391a775a630
2014-06-23 22:19:09 +09:00
Jean Chalard e689d37f72 Remove a useless method
Change-Id: I21a4219f682f43f4a84b1ab12d00dd930b35caa1
2014-06-10 12:47:55 +09:00
Keisuke Kuroyanagi 7f0316c27e Merge "Add distracter cache to optimize the distracter test." 2014-06-09 05:35:46 +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 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
Tadashi G. Takaoka 2385314be0 Merge "Refactor logic to determine showing suggestions strip or not" 2014-06-06 10:48:00 +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
Jean Chalard c84b10840e Don't recapitalize just at the start of input
Bug: 13283555
Change-Id: Iab0466425dc44779d110f2cd29d725d22eb04827
2014-06-04 16:29:31 +09:00
Jean Chalard 4a1113b6b0 Refactoring
Rename `initialize' to `start' and `deactivate' to `stop' for ease
of understanding. It's completely bizarre that you can "deactivate"
a recapitalization and that will just restart a new one the next time
you press shift. Start and stop are easier to understand.

Change-Id: I455175aebfcfe11198c6c61bf2c6b19efc3f82df
2014-06-04 16:29:29 +09:00
Tadashi G. Takaoka aaf2bbf9c3 Merge "Remove LatinImeLogger and UsabilityStudyLogUtils" 2014-05-29 09:33:25 +00:00
Tadashi G. Takaoka 51ee5a47b8 Remove LatinImeLogger and UsabilityStudyLogUtils
This CL must be checked in together with Ie52007dc5c.

Bug: 15318007
Change-Id: Ie665f296e43b5485ae8ba7e949aa262794ee0dcc
2014-05-29 18:03:03 +09:00
Keisuke Kuroyanagi 94f88b4881 Remove PrioritizedSerialExecutor.
Bug: 15320560
Change-Id: Icb88a96ebd685da1d2cba7b07889a2751c603a2e
2014-05-29 17:36:32 +09:00
Tadashi G. Takaoka bbf556e8e1 Remove researcher logger
This CL must be checked in together with I5cc76807e3.

Bug: 15318007
Change-Id: I61423c3377ddc299fb332e742d6626c2e47145bb
2014-05-29 15:10:28 +09:00
Keisuke Kuroyanagi 4bffac6db9 Stop directly checking SuggestedWordInfo.mKind
Bug: 15298959

Change-Id: Iba6eeb7981634e7ddb896404978b30f6efd6e72f
2014-05-28 20:35:45 +09:00
Keisuke Kuroyanagi 26628eeb4b Merge "Add thread name for PrioritizedSerialExecutor." 2014-05-27 07:24:26 +00:00
Keisuke Kuroyanagi 00da83ed75 Stop filtering out when perfect freq > top non-perfect freq.
Bug: 13142176
Change-Id: I0290df918a5bd5018bf55231dc462d5e797155c6
2014-05-27 16:09:59 +09:00
Keisuke Kuroyanagi 733a9c09a9 Add thread name for PrioritizedSerialExecutor.
Bug: 15270123
Change-Id: I655ba97f0543476980d0e8461bc1c8a56c9f954b
2014-05-27 16:06:08 +09:00
Keisuke Kuroyanagi 17bd4eb0c9 Apply distracter filter for UserHistoryDictionary.
Bug: 13142176
Change-Id: I67d63a5c789d7c587bcd7abacd26b2e76da11978
2014-05-27 01:10:04 +09:00
Keisuke Kuroyanagi ba33831d76 Apply distracter filter for in-vocabulary words.
Bug: 13142176
Change-Id: I4db763783a2f8b9a0df0df951db3223f70748870
2014-05-26 23:11:24 +09:00
Keisuke Kuroyanagi a6278eb9c1 Use whether it's exact match to detect distracters.
Bug: 13142176
Change-Id: Id5b7286d28897931f7bfe571be45d46ffeef4adf
2014-05-26 21:56:20 +09:00
Tadashi G. Takaoka a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Keisuke Kuroyanagi a790c5b683 Introduce EMPTY_PREV_WORDS_INFO and BEGINNING_OF_SENTENCE.
Bug: 14119293
Change-Id: I5020e5f0aa64bc3e97b3a3c2c07a60c8b765ed64
2014-05-23 23:19:33 +09:00
Keisuke Kuroyanagi 85befc0873 Merge "Make DistracterFilter interface." 2014-05-23 10:11:57 +00:00
Jean Chalard cfdb1b8d26 Fix some auto-caps problems:
- (mainly for Spanish) auto-caps after inverted bang and what
- (German only) don't auto-cap after digits-period-space

Bug: 15177663
Bug: 12206753
Change-Id: Ia214bc067319469d9debbbfbdcb1dcff980847f0
2014-05-23 18:17:09 +09:00
Keisuke Kuroyanagi f498e53933 Make DistracterFilter interface.
Bug: 13142176
Bug: 15094186
Change-Id: If94b0a155b5ea2ff6b839e7da9d12a9cc6553931
2014-05-23 18:12:37 +09:00
Keisuke Kuroyanagi 1fa3e9044f Move distracter filter to dictionary facilitator.
Bug: 13142176
Bug: 15094186
Change-Id: Ib9e42f8e25538009f3ba62cf1e034cae3f6823c7
2014-05-23 16:10:36 +09:00
Keisuke Kuroyanagi a1035be6d8 Have DictionaryFacilitator in LatinIME.
Bug: 13142176
Bug: 15094186
Change-Id: I9da67352ff2abcd289fa5885389895ced878a413
2014-05-23 09:30:55 +09:00
Keisuke Kuroyanagi 9218c51129 Fix: NPE in DistracterFilter
Change-Id: I19a92d79cf547aae8f15e7e5fd5309812ae4f2d5
2014-05-22 16:33:45 +09:00
Keisuke Kuroyanagi 17ae0eb7e7 Use enabled subtypes for Keyboard in DistracterFilter.
Bug: 13142176
Bug: 15094186
Change-Id: I142eeaa11f838080a4fc5a342155e5d470eab3d4
2014-05-21 14:08:39 +09:00
Keisuke Kuroyanagi e507d92aa3 Use PrevWordsInfo for get/add/remove n-gram(bigram) entry.
Bug: 14119293
Bug: 14425059
Bug: 15102610
Change-Id: Ib482390f8d15b37d44a1a54e8c243a9eaec3f815
2014-05-21 11:15:38 +09:00
Ken Wakasa 4e21d3711f Revert "Use PrevWordsInfo for get/add/remove n-gram(bigram) entry."
This reverts commit ff50b39176.

Bug: 14119293
Bug: 14425059
Bug: 15102610

Change-Id: If278b4ab236e38d20d8cdc0761b0438911bd4ff9
2014-05-20 14:01:06 +00:00
Keisuke Kuroyanagi ff50b39176 Use PrevWordsInfo for get/add/remove n-gram(bigram) entry.
Bug: 14119293
Bug: 14425059

Change-Id: I12e9ba977c153b514c6591ab52940712fd0874e3
2014-05-20 13:37:04 +09:00
Keisuke Kuroyanagi 83c40a2301 Use PrevWordsInfo instead of String in Java side.
Bug: 14119293
Bug: 14425059

Change-Id: I3d5da84881a49a04550180dd9aac2c37da2ed762
2014-05-19 13:55:40 +09:00
Keisuke Kuroyanagi 23246ed18d Use dedicated DictionaryFacilitator for DistracterFilter
Bug: 15002249
Change-Id: Ic77eaa7d627d406daad7dcd15cb4884d9f647312
2014-05-17 01:18:08 +09:00
Keisuke Kuroyanagi 96013c9605 Merge "Revert "Use dedicated DictionaryFacilitator for DistracterFilter"" 2014-05-16 11:17:45 +00:00
Keisuke Kuroyanagi f9377c8920 Revert "Use dedicated DictionaryFacilitator for DistracterFilter"
This reverts commit 7122fe76e3.

Change-Id: I341089864a2b58de6e0f35844a12fb632bd1eabb
2014-05-16 11:16:54 +00:00
Keisuke Kuroyanagi 0dac17f5fb Merge "Use dedicated DictionaryFacilitator for DistracterFilter" 2014-05-16 10:49:02 +00:00
Keisuke Kuroyanagi 7122fe76e3 Use dedicated DictionaryFacilitator for DistracterFilter
Bug: 15002249
Change-Id: I2ebf1941fb0453ea4b97c0e539f8b36e5e0262c1
2014-05-16 18:39:31 +09:00
Keisuke Kuroyanagi 34873a66f0 Fix: StringIndexOutOfBoundsException.
Bug: 14985751
Change-Id: I9df2f737555ab02e24e0fbd231a97c1eec26bc57
2014-05-16 15:32:12 +09:00
Yohei Yukawa f0fc320b4e Merge "Simplify StatsUtils" 2014-05-15 06:35:42 +00:00
Xiaojun Bi 3686bdfcc1 Fix off-device build
This CL fixed the breakage caused by DistracterFilter.
It should be checked in together with I8f53e9481c0f

Bug: 14911612
Bug: 13142176
Change-Id: I33c3526165cea58926d10404552f1fadc385c2e5
2014-05-14 17:39:02 -07:00
Yohei Yukawa 9aa7f66a15 Simplify StatsUtils
With this CL, the implementation of StatsUtils no longer
needs to know how to read settings from the system.

Insted, the LatinIME class is now responsible for notifying
StatsUtils whenever the settings is changed.

BUG: 14324207
Change-Id: Ic3d26ec31c8d2c082d3e7487b578b323aad2f960
2014-05-15 00:11:13 +09:00
Xiaojun Bi eb4f8506d6 Fix a NPE in DistracterFilter.isDistracterToWordsInDictionaries()
Bug: 14904706
Change-Id: I3b52bb01b9c59cbba2eba0bd1d91dffb4419c019
2014-05-13 21:00:28 -07:00
Xiaojun Bi 25ec32f635 Merge "Implement the distracter filter" 2014-05-13 23:08:40 +00:00
Xiaojun Bi ac20253806 Implement the distracter filter
Bug: 13142176

Change-Id: I85a048cdcbbad3d6020a25f900250d8d7a0fe3da
2014-05-13 15:52:14 -07:00
Jean Chalard be99616afa Create the path for specifying combining rules in the subtype
Also add the skeleton of the combining rules for Myanmar
reordering as a pilot.

Bug: 13945569
Change-Id: Iabeb6838f45f1efff482143595ce5b48543e0c43
2014-05-12 15:58:51 +09:00
Xiaojun Bi 17284659ce Use DistracterFilter when getting Language Model Param of a word
A preparation for implementing Distracter Filter.

This CL should be checked in together with Icfefa0463180

Bug: 13142176

Change-Id: If9e5ca840c4a81cb0339ab70f146b42fbfa7af5d
2014-05-07 10:10:18 -07:00
Keisuke Kuroyanagi c0d754397e Fix unit tests by adding @UsedFortesting.
Change-Id: I8f66632a32b9e9ddc1b771e8ee74492c7baf9338
2014-04-29 00:00:57 +09:00
Keisuke Kuroyanagi 570602a088 Simplify asyncFlushBinaryDictionary.
We no longer write files when the dict has not been updated.

Bug: 8187060
Change-Id: I8aa23a93d5deafb3a7f16f5466a5e0e84fbbf095
2014-04-28 17:30:36 +09:00
Xiaojun Bi 516c884b11 Merge "Prepare to implement distracter filter" 2014-04-25 17:15:53 +00:00
Xiaojun Bi 281dd99346 Prepare to implement distracter filter
It was implemented according to the Plan B in the
design doc:
http://go/ime-misspelling-filter

This CL is to create a DistracterFilter instance
and pass it to PersonalizationDictionarySessionRegistrar.

This patch should be checked in together with
Id633b4fd45693

Bug: 13142176
Change-Id: Ia4957e64218c9619fcf9bb91795a187617c72a2e
2014-04-25 09:13:22 -07:00
Keisuke Kuroyanagi d437df0ab0 Quit creating empty dictionary file in ExpandableBinaryDictionary.
Bug: 14166482
Change-Id: I7b7a25141851d7bb14744567639d8e5d8f04a036
2014-04-22 13:18:36 -07:00
Tadashi G. Takaoka 543d3d24bd Stop using Configuration.setLocale
The call for method Configuration.setLocale that is introduce by
If60877b29b should be remove to be compatible with API 14 and later.

Bug: 14239862
Change-Id: I3815c2b56bd9c655b8bde6f93143adf3ff08c35d
2014-04-22 09:22:46 -07:00
Tadashi G. Takaoka 5c490e5da5 Refactor RunInLocale a bit
Change-Id: If60877b29bb1263161ec85c99320ad07b7dd4245
2014-04-17 17:39:19 +09:00
Keisuke Kuroyanagi b21edc4402 Shuwdown executors after executing all tasks.
Bug: 14113276
Change-Id: Ie42ef30ffe5767ca434db4669efad2027b474e74
2014-04-17 09:28:52 +09:00
Tadashi G. Takaoka 58e830ec19 Refactor SubtypeLocaleUtils a bit
Change-Id: If8b7fd5ef0b4ff3791deeacc12abb256a10176bf
2014-04-10 17:24:58 +09:00
Jean Chalard 5f430e0189 [CB25] Refactor some array copying
Bug: 13406701
Change-Id: I09edd822f5cc2446b324d41c76d835bcff1191e6
2014-04-09 18:38:29 +09:00
Yohei Yukawa 36dfb6d1a4 Fix build breakage caused by I0218dd07
BUG: 11746191
Change-Id: I0b693c4b22793f6e8fd77a9f045f205aa8fe4050
2014-04-08 20:00:16 +09:00
Yohei Yukawa c9539f42f6 Merge "Add StatsUtils for checking state" 2014-04-08 10:23:41 +00:00
Yohei Yukawa dc0f7ca167 Add StatsUtils for checking state
BUG: 11746191
Change-Id: I0218dd07dde1d09321009ea1497258fc4235a1e8
2014-04-08 19:09:49 +09:00
Tadashi G. Takaoka 9b46ddc1d5 Use platform default theme for activities and dialogs
Bug: 13698528
Change-Id: Ib904c911452525e3749c0eb287434b504576db5f
2014-04-04 17:13:54 +09:00
Jean Chalard 3285b68c97 [CB17] Remove a member.
Bug: 13406701
Change-Id: I2e271f637f6b529a4191a7adc5cdfa5af437761b
2014-04-02 17:57:36 +09:00
Tadashi G. Takaoka 9364d46ac3 Add SpacebarLanguageUtils class
The SpacebarLanguageUtils class is separated from SubtypeLocaleUtils
and handles the language name on the spacebar.

Bug: 8084704
Change-Id: I82f79a061d4f0cc2895263298c3ebf8ee444c61d
2014-04-01 12:17:06 +09:00
Keisuke Kuroyanagi 781e3df73b Merge "Dictionary migration in Java side." 2014-03-28 08:07:26 +00:00
Tadashi G. Takaoka f173b12b03 Merge "Stop displaying locale string on short space bar" 2014-03-28 04:49:17 +00:00