History log of /frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
23cbe85610f780134cc77dd4a54732a22ed6e86e 18-May-2016 Yohei Yukawa <yukawa@google.com> Move LocaleList to avoid layering violation.

Since LocaleList needs to depend on android.os.Parcelable, we cannot let
that class belong to "android.util" package, which causes layering
violation.

Bug: 28819696
Change-Id: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java
072a95a3094af2ced4f009ad62c4553c28e3f830 05-Mar-2016 Seigo Nonaka <nona@google.com> Introduce script matching for enabling default IME subtypes.

This is 2nd attempt of I5bb1bd8cdb9096d516d60beb9936e55bf2b757ae

The motivation of this CL is enhance the default IME subtype enabling
algorithm. The new approach is done by score based algorithm. The
design of the matching score is determined as follows:
- The matching score for the each two locale is up to 3 and determined
as follows:
- Score of 3 : matches all language, script and country.
- Score of 2 : matches the language and script.
- Score of 1 : matches the language regardless of country.
- Score of 0 : doesn't match the language regardless of script and
country.
- All locales are fully expanded before matching by addLikelySubtags in
ICU.

Bug: 27129703
Bug: 27348943
Change-Id: I8fc774154f5175abff2f16e8f12a4847bf5f5b7c
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java
77dd59fc2a0db94f0c58e17097fd6f07c1b5db8c 06-Mar-2016 Yohei Yukawa <yukawa@google.com> Revert "Introduce script matching for enabling default IME subtypes."

This reverts commit 9e7a1c9824cffca32fd7d58bb13bd3416ab32091.

Seems that that CL causes ArrayIndexOutOfBoundsException when
initializing InputMethodManagerService, which results in an infinite
boot animation.

Bug: 27129703
Bug: 27348943
Change-Id: I474a87876670ac018c675ac7b4608e90fbb2434b
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java
9e7a1c9824cffca32fd7d58bb13bd3416ab32091 05-Mar-2016 Seigo Nonaka <nona@google.com> Introduce script matching for enabling default IME subtypes.

The motivation of this CL is enhance the default IME subtype enabling
algorithm. The new approach is done by score based algorithm. The
design of the matching score is determined as follows:
- The matching score for the each two locale is up to 3 and determined
as follows:
- Score of 3 : matches all language, script and country.
- Score of 2 : matches the language and script.
- Score of 1 : matches the language regardless of country.
- Score of 0 : doesn't match the language regardless of script and
country.
- All locales are fully expanded before matching by addLikelySubtags in
ICU.

Bug: 27129703
Change-Id: I5bb1bd8cdb9096d516d60beb9936e55bf2b757ae
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java
102ff0726dad764df741e41766d78fcfb829184a 25-Feb-2016 Yohei Yukawa <yukawa@google.com> Add a utility method to filter locales.

This is a preparation CL to take secondary system locales into
account in InputMethodUtils#getImplicitlyApplicableSubtypesLocked().

Suppose the following situation:

available subtypes:
en-US, en-IN, and en-GB, fr, fr-CA, fr-CH, fr (QWERTZ)
system locales:
en-GB, en-US, fr-MC

Basically we want to have at most one subtype for each language appears
in system locales. Hence the goal of this utility method is to filter
the above available subtypes into en-GB and fr. In other word, we do
not want to enable both en-GB and en-US subtypes in this scenario.

This CL introduces LocaleUtils#filterByLanguage() for this purpose, with
some unit tests. Note that that method is not used in production yet.

Bug: 27129703
Change-Id: I315cf3722a06e00bdbfac284c4949578da8fe78d
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java