Skip to content
Commit 102ff072 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

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
parent fc843713
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment