summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-prod (mdb) <android-build-team-robot@google.com>2017-06-09 15:48:31 +0000
committerandroid-build-prod (mdb) <android-build-team-robot@google.com>2017-06-09 15:48:31 +0000
commitb9be141c057c25ec00d632f0115086fd9a01a256 (patch)
tree2249c0c467d1f57a4933456e9b9e2744cca270fb
parent3d80a06a27b182342c2de53e3a3e1dc7edac745a (diff)
parenta3249f39bf947a14030443045c433f75c4f68da4 (diff)
downloadicu-b9be141c057c25ec00d632f0115086fd9a01a256.tar.gz
Change-Id: Ibd30153300008fe6c1808044d10e62386f4dc5ef
-rw-r--r--android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java6
-rw-r--r--icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ULocaleTest.java6
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");
}
}