release-request-eba598ae-9b63-4750-9c52-ff746ca472be-for-aosp-nougat-cts-release-4081897 snap-temp-L46500000072673285

Change-Id: Ibd30153300008fe6c1808044d10e62386f4dc5ef
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 08c10ba..2186f98 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 @@
         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 ab5defb..b7702f9 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 @@
         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");
         }
     }