Commit Graph

51 Commits (9ebba46c775f37abeb0451602cb323fd45adf33b)

Author SHA1 Message Date
Yohei Yukawa 809c93214b Experimental automatic language switching support.
With this CL, LatinIME switches the current subtype from its enabled
subtypes based on the first locale in EditorInfo#hintLocales.

This functionality is still experimental, and will be triggered only
when EditorInfo#hintLocales is specified by the application.

Bug: 22859862
Change-Id: Ibd0559b370d8aa0d50d1bada8ecfdac0ed8db898
2016-01-22 02:24:28 -08:00
Dan Zivkovic 107fb4c476 Remove ALS from LatinIME.
This fixes unit tests and brings us closer to a green build.

Change-Id: Iffcc392eda4a7671a238b79cc7367320ca648725
2015-03-11 17:29:12 -07:00
Dan Zivkovic b86ca76cea Handle null InputMethodSubtype.
Bug 19627494.

Change-Id: I50dc77c59ced0f2e7c07a49ae0cb040197c2ab35
2015-03-06 14:34:57 -08:00
Dan Zivkovic 12d80ebead Remove shortcut support from LatinIME.
Note this change does not affect the native decoder interface.

Change-Id: I73b7dc008a5acaf75a31a36a2d332b5afabd82d0
2015-02-11 13:02:41 -08:00
Dan Zivkovic 77e0fa1d67 LatinIME portion of multi-lang option removal.
Bug 19188067.

Change-Id: Ic9a3637f59dda30c699141222b9dcac3cd624b99
2015-01-29 15:57:03 -08:00
Tadashi G. Takaoka dbdc81a36a Merge "Cleanup InputMethodInfoCache" 2014-12-17 06:39:19 +00:00
Tadashi G. Takaoka afd52dfc60 Cleanup InputMethodInfoCache
Change-Id: I40afeb4557c3b1ad32bd90f67502a625df2bc3fb
2014-12-12 13:53:13 +09:00
Tadashi G. Takaoka 31a10e226d Remove SubtypeSwitcher
Change-Id: Ic4def69a9f742f13c98bc3e518c406658b52797d
2014-12-12 13:45:46 +09:00
Jean Chalard 498dbfbd9d Disable multiple language input
Bug: 18705799
Change-Id: I73730ccf59e2697acfb3fe436c01b94c40307f2f
2014-12-11 14:50:03 +09:00
Tadashi G. Takaoka 2b25f674f2 Add NetworkConnectivityUtils class
Change-Id: I7bd71f1d4ef0fc0fe21ddfd9f3e11463f53ac4e7
2014-12-11 01:37:44 +00:00
Tadashi G. Takaoka 4486314225 Remove RichInputMethodManager.updateShortcutIME call from SubtypeSwitcher
Change-Id: I5661a7926cf5a404788516c542b25cc0707bb417
2014-12-01 12:16:10 +09:00
Tadashi G. Takaoka 8a711f2a54 Remove unneeded Context argument
Change-Id: Ib34931836a617d0dc049fb3c9ae6686374ec8c12
2014-11-21 12:49:04 +09:00
Tadashi G. Takaoka 7fb0ed58ed Move current subtype management code to RichInputMethodManager
Change-Id: I82d5a17a5ec96f26047d29e79f3f28850fc5b3bb
2014-11-06 11:51:07 -08:00
Tadashi G. Takaoka 8a2c4afad4 Move shorcut IME related code from SubtypeSwitcher to RichInputMethodManager
Change-Id: I0f95f603d80570c937e8c38ded88df341c11795e
2014-11-06 11:51:07 -08:00
Tadashi G. Takaoka 2a7da0ab87 Move some methods out from SubtypeSwitcher
Change-Id: I89aaf87d7d0cc204b0ca0f61c2f64d15e2df848e
2014-11-06 11:51:01 -08:00
Ken Wakasa 9342484e8d Move Constants.java to the latin.common package
Our intention is to have classes of latinime-common under the common
package as much as we can.

Change-Id: I76efbbbe7bebf1a4aa943715cdff64f91675e20d
2014-10-23 20:27:37 +09:00
Tadashi G. Takaoka d3a4c51324 Fix Javadoc and null analysis related warnings
This CL also adds @SuppressWarning("unused" to java-overridable package.

Bug: 18003991
Change-Id: If70527e30654384705d7a814f5efd181d9f539e1
2014-10-23 09:58:42 +09:00
Tadashi G. Takaoka 5f00fe09e9 Fix some compiler warnings
This CL fixes the following compiler warnings.

- Indirect access to static member
- Access to a non-accessible member of an enclosing type
- Parameter assignment
- Method can be static
- Local variable declaration hides another field or variable
- Value of local variable is not used
- Unused import
- Unused private member
- Unnecessary 'else' statement
- Unnecessary declaration of throw exception
- Redundant type arguments
- Missing '@Override' annotation
- Unused '@SuppressWarning' annotations

Bug: 18003991
Change-Id: Icfebe753e53a2cc621848f769d6a3d7ce501ebc7
2014-10-21 19:28:37 +09:00
Jean Chalard f13487dfbf [ML25] Add an hasDict method.
We used to have separate methods for existence of dicts
according to whether it's a file or a resource. This unifies both.

Bug: 11230254
Bug: 17979623
Change-Id: I728773461f3465f756d06297c3f3bee34390c3e6
2014-10-16 17:09:27 +09:00
Jean Chalard b256bb5791 [ML24] Add facilities to read the script of a subtype
...or more exactly, the script of the keyboard layout set associated
with a given subtype.

Bug: 11230254
Change-Id: I82f5fc81ecffc561781816008c853be6ff9438dd
2014-10-14 20:19:15 +09:00
Jean Chalard d15f6e8c98 Performance fix for multiple language subtypes
The code would iterate all enabled subtypes each time
getCurrentSubtype() is called, which is really quite frequent.

Bug: 11230254
Change-Id: I91feb36de6eca84967e848fc585aae04b350be89
2014-10-14 15:13:35 +09:00
Jean Chalard 437fcbaa9f [ML20.1] Move getRichInputMethodSubtype to additional features
Bug: 11230254
Change-Id: I9bc19db5f101eeb6841394fe3637f271c93cbfa7
2014-10-09 16:35:15 +09:00
Jean Chalard dc44260484 Merge "Revert "Revert "[ML1] Introduce RichInputMethodSubtype""" 2014-08-25 05:24:28 +00: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 6c638d1bbd Merge "Revert "[ML1] Introduce RichInputMethodSubtype"" 2014-08-22 09:41:46 +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 f429d8f138 Merge "[ML1] Introduce RichInputMethodSubtype" 2014-08-22 07:42:29 +00:00
Jean Chalard 8ffe4bc932 [ML1] Introduce RichInputMethodSubtype
Bug: 11230254
Change-Id: Ic7a1bf938a5a186dcff527b556295aba2406e8b9
2014-08-22 16:34:27 +09:00
Mohammadinamul Sheik 698b19ef35 Pass a new argument to StatsUtils.
Change-Id: I61e32c7a455a273e8daf9a5487d7969923802488
Bug: 17013677
2014-08-22 15:58:45 +09: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 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 a91561aa58 Use Java 7 diamond operator
Change-Id: If16ef50ae73147594615d0f49d6a22621eaf1aef
2014-05-24 01:05:42 +09:00
Yohei Yukawa 1690992d1b Check OS codename for shouldOfferSwitchingToNextInputMethod
Make sure if Build.VERSION.CODENAME is "REL" or not when
Build.VERSION.SDK_INT is 19 (KitKat). This is a tentative
workaround until Build.VERSION.SDK_INT is bumped to 20 or
greater.

BUG: 12965588
Change-Id: I0f6a8ef92af221240d247997ce65bd5e351b2d5e
2014-04-30 17:08:04 +09:00
Yohei Yukawa 8ba4f33709 Use shouldOfferSwitchingToNextInputMethod when available
With this CL, LatinIME starts using
InputMethodManager#shouldOfferSwitchingToNextInputMethod when
available and API level is higher than 19 (KitKat).

Note that relevant settings of LatinIME will be ignored if
InputMethodManager#shouldOfferSwitchingToNextInputMethod is
considered to be available at the moment. We will revisit
here to reorganize the user visible settings before the
new global IME switching mechanism becomes publicly
available.

BUG: 12965588
Change-Id: I0188fa56cba8e983c61cef3ae3400a0e3821f718
2014-04-28 15:11:19 +09:00
Tadashi G. Takaoka ad5795a891 Fix InputMethodInfo cache in RichInputMethodManager
Bug: 13271570
Change-Id: Ie06cd83baaaf674d8b34f0232c164c4541aceb43
2014-03-03 23:36:35 +09:00
Tadashi G. Takaoka a410cb48ea Move subtype related utility class to utils package
Change-Id: I3564796531ea85f2ebafde40cd822b806b8741df
2013-07-24 15:52:43 +09:00
Tadashi G. Takaoka e6c5184742 Fix NPE in SubtypeLocale.getSubtypeDisplayName
This change moves the methods that create the subtype display name for
spacebar from MainKeyboardView to SubtypeLocale class, and
consolidates SpacebarTextTests with SubtypeLocaleTests.

Bug: 9962955
Change-Id: Ifa0a08ff80bc30753a213c2feb471599ca63fa66
2013-07-23 13:00:04 +09:00
Ken Wakasa a7d2fc6bef Move settings related classes to "settings"
Change-Id: Id170dbfe2dcfc93130b7be4a84615940403ec37f
2013-07-22 16:35:44 +09:00
Ken Wakasa e28eba5074 Move util classes to the latin/utils directory
Change-Id: I1c5b27c8edf231680edb8d96f63b9d04cfc6a6fa
2013-06-24 17:04:40 +09:00
Jean Chalard ff6445ed0e Cache subtype lists reasonably.
This will spare a lot of IPC for Latin IME at the cost of very little
retained memory.
This improves the loading by potentially a lot - between 15 and 30%
when the layout is cached (which should now be the case almost every
time), and half that if it's not. More importantly, it makes the
load time less sensitive to high device load, which is one of the
sore points.

Bug: 8689779
Change-Id: I2e07736f1a92c38eed0e203bc690761a181da8b9
2013-06-12 18:04:52 +09:00
Tadashi G. Takaoka 77f63c8ac6 Don't use RichInputMethodManager in setup wizard
In setup wizard, InputMethodManager may not be able to be aware that
this IME is installed, especially just after the IME is installed via
GooglePlay app and hit the open button on the app to launch the setup
wizard.

Bug: 9299618
Change-Id: I00c8544178b41074253d49ae9481996ec56593d2
2013-06-07 19:09:44 +09:00
Satoshi Kataoka 10e8b93977 Fix a crash on a secondary user
Bug: 9054063
Change-Id: I092ab6e0077578d0aca57d2e41dfbc00b46e1ba4
2013-05-21 12:27:16 +09:00
Satoshi Kataoka b902109000 Fix usages of getEnabledInputMethodSubtypeList
Bug: 8450279
Change-Id: Ib8433442ae6ca6c28da2652bff687cdeaf7c196e
2013-05-09 17:07:19 +09:00
Tadashi G. Takaoka 85629debaa Implement IMM.switchToNextInputMethod() for ICS
Bug: 8633367
Change-Id: Ifc0f97b1fdf5e5cc3601c24a503058c4822478dc
2013-04-22 19:30:56 +09:00
Tadashi G. Takaoka d3b0ecec22 Clean up public helper methods of SettingsValues
Change-Id: I6c6087580b67f497eaaf16900f8df7a4a895b8e3
2013-01-09 11:23:34 +09:00
Tadashi G. Takaoka f90fc105ab Simplify singleton class initialization
Change-Id: I16a27f2ed6ea66184bfdc9903180372cd7ea2fd1
2013-01-07 19:05:31 +09:00
Tadashi G. Takaoka 85e397cd10 Set additional subtypes before getting current subtype
Bug: 7594188
Change-Id: I1977acb7189f8eb186b9b20a3e5b64b4aaabf191
2012-11-28 14:49:38 +09:00
Tadashi G. Takaoka 76d4ffeebf Add Spanish United States keyboard
The subtype locale name on the spacebar will be suppressed when only
one subtype is enabled and
 - Subtype locale is equal to the system locale.
or
 - Subtype language is equal to the system language but the subtype is
   implicitly enabled.

Thus the "es_ES" system locale chooses "es" subtype keyboard
implicitly but the keyboard doesn't have the subtype name on its
spacebar.

This change also removes Spanish Latin America keyboard.

Bug: 7531804
Change-Id: Ib929e8235d643c0ba039eb010e18ab721a734e15
2012-11-19 15:39:44 +09:00
Tadashi G. Takaoka 1931c1cab1 Fix language switch key behavior
Bug: 7075923
Change-Id: I306e1ff5d9f873541e84e1fafb64b9473947f623
2012-11-14 18:27:00 +09:00