diff options
author | Yohei Yukawa <yukawa@google.com> | 2015-06-02 16:50:14 -0700 |
---|---|---|
committer | Yohei Yukawa <yukawa@google.com> | 2015-06-02 17:09:50 -0700 |
commit | 92280cd309b0f5967dd253280962d8581844db89 (patch) | |
tree | 5f71fb2d687bf63b39a60c7f430cafa898bcc73d /core/tests/inputmethodtests/src | |
parent | c5ff0020a2467e0b7aed590d790b5a1b4b082f56 (diff) | |
download | frameworks_base-92280cd309b0f5967dd253280962d8581844db89.zip frameworks_base-92280cd309b0f5967dd253280962d8581844db89.tar.gz frameworks_base-92280cd309b0f5967dd253280962d8581844db89.tar.bz2 |
Convert subtypes whose locale is "tl" to "fil".
On Android, "tl" is a historic hack for what should really
be "fil". Now that we properly support 3-letter language codes,
we should be using "fil" throughout. Given this historical usage,
IMEs that really want to support Tagalog (and not Filipino)
should use the ISO-639-3 code for Tagalog, which is "tgl".
For backward compatibility reasons, this CL uses the similar
approach to I26e3aa0333aa3c76c80a3c1c9090cc2b368c8e10.
InputMethodSubtype.getLocale() continues to return the "locale"
string parameter passed to the constructor as is, but in the
Android framework we do normalizations/conversions whenever
we need a valid ISO-639-3 code.
In I26e3aa0333aa3c76c80a3c1c9090cc2b368c8e10, we rely on the
conversion in the Locale constructor. In this CL, we do replace
"tl" with "fil" by ourselves.
This CL also adds InputMethodSubtype#getLocaleObject() a hidden
API so that we can start relying on the Locale object at least
in the framework.
This CL is based on the investigation by Narayan Kamath and his
patch.
Bug: 20696126
Change-Id: I94f203bddceb9c87710cb187cc3cc0ee6d9092a5
Diffstat (limited to 'core/tests/inputmethodtests/src')
-rw-r--r-- | core/tests/inputmethodtests/src/android/os/InputMethodSubtypeTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/tests/inputmethodtests/src/android/os/InputMethodSubtypeTest.java b/core/tests/inputmethodtests/src/android/os/InputMethodSubtypeTest.java index 323a360..8feac9b 100644 --- a/core/tests/inputmethodtests/src/android/os/InputMethodSubtypeTest.java +++ b/core/tests/inputmethodtests/src/android/os/InputMethodSubtypeTest.java @@ -56,6 +56,10 @@ public class InputMethodSubtypeTest extends InstrumentationTestCase { verifyLocale("zz"); verifyLocale("iw"); verifyLocale("he"); + verifyLocale("tl"); + verifyLocale("tl_PH"); + verifyLocale("fil"); + verifyLocale("fil_PH"); } @SmallTest |