diff options
-rw-r--r-- | android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java | 6 | ||||
-rw-r--r-- | icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ULocaleTest.java | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java index 08c10ba3a..2186f9830 100644 --- a/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java +++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java @@ -971,7 +971,11 @@ public class ULocaleTest extends TestFmwk { if(locales.length<10){ errln("Did not get the correct result from getAvailableLocales"); } - if(!locales[locales.length-1].getName().equals("zu_ZA")){ + // Android patch (http://b/31841293) start. + // Accept locales other than zu_ZA at the end, as some OEMs add locales. Any locale added + // after the original zu_ZA has to start with "z", as that's the last acceptable letter. + if(!locales[locales.length-1].getName().startsWith("z")){ + // Android patch (http://b/31841293) end. errln("Did not get the expected result"); } } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ULocaleTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ULocaleTest.java index ab5defb78..b7702f9e1 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ULocaleTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ULocaleTest.java @@ -967,7 +967,11 @@ public class ULocaleTest extends TestFmwk { if(locales.length<10){ errln("Did not get the correct result from getAvailableLocales"); } - if(!locales[locales.length-1].getName().equals("zu_ZA")){ + // Android patch (http://b/31841293) start. + // Accept locales other than zu_ZA at the end, as some OEMs add locales. Any locale added + // after the original zu_ZA has to start with "z", as that's the last acceptable letter. + if(!locales[locales.length-1].getName().startsWith("z")){ + // Android patch (http://b/31841293) end. errln("Did not get the expected result"); } } |