summaryrefslogtreecommitdiffstats
path: root/core/tests/inputmethodtests/src
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2015-02-21 02:15:48 +0900
committerYohei Yukawa <yukawa@google.com>2015-02-21 02:26:40 +0900
commitf487e0e395a4e49f28c6448339d57357667756c6 (patch)
tree558357392e163697d020f9026eeb5ed03127f019 /core/tests/inputmethodtests/src
parente55524ef0482bfcf77bf1344f7fda9ef7263d32f (diff)
downloadframeworks_base-f487e0e395a4e49f28c6448339d57357667756c6.zip
frameworks_base-f487e0e395a4e49f28c6448339d57357667756c6.tar.gz
frameworks_base-f487e0e395a4e49f28c6448339d57357667756c6.tar.bz2
Normalize deprecated 2-letter language code when necessary.
This is a follow up CL for I7d932e60311b80c05be8f02c9e803f18da0e0054, which revealed that we could not use deprecated 2-letter code like "in" to query subtype which has new language codes like "id". This CL addresses the above issue by normalizing the language code with Locale#Locale(String, String) before comparing one to another. Change-Id: I26e3aa0333aa3c76c80a3c1c9090cc2b368c8e10
Diffstat (limited to 'core/tests/inputmethodtests/src')
-rw-r--r--core/tests/inputmethodtests/src/android/os/InputMethodTest.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/tests/inputmethodtests/src/android/os/InputMethodTest.java b/core/tests/inputmethodtests/src/android/os/InputMethodTest.java
index 86021e5..a50fb54 100644
--- a/core/tests/inputmethodtests/src/android/os/InputMethodTest.java
+++ b/core/tests/inputmethodtests/src/android/os/InputMethodTest.java
@@ -554,13 +554,11 @@ public class InputMethodTest extends InstrumentationTestCase {
subtypes);
assertTrue(InputMethodUtils.containsSubtypeOf(imi, LOCALE_IN, !CHECK_COUNTRY,
SUBTYPE_MODE_KEYBOARD));
- // TODO: This should be true but the current behavior is broken.
- assertFalse(InputMethodUtils.containsSubtypeOf(imi, LOCALE_IN, CHECK_COUNTRY,
+ assertTrue(InputMethodUtils.containsSubtypeOf(imi, LOCALE_IN, CHECK_COUNTRY,
SUBTYPE_MODE_KEYBOARD));
assertTrue(InputMethodUtils.containsSubtypeOf(imi, LOCALE_ID, !CHECK_COUNTRY,
SUBTYPE_MODE_KEYBOARD));
- // TODO: This should be true but the current behavior is broken.
- assertFalse(InputMethodUtils.containsSubtypeOf(imi, LOCALE_ID, CHECK_COUNTRY,
+ assertTrue(InputMethodUtils.containsSubtypeOf(imi, LOCALE_ID, CHECK_COUNTRY,
SUBTYPE_MODE_KEYBOARD));
}
}