Skip to content

Commit c78565c

Browse files
rmccandi34
authored andcommitted
Locale: Retain compatibility with 4.4 APIs
Wrap the new methods from change I9b2d7f8d17f970d1b57111dcfe92c16e68b0fa67 in the previous public method. Fixes libcore.icu.ICUTest#test_localeFromString Change-Id: Icbffb5d5b55329f29c791b57d019817b5c298431
1 parent 833e901 commit c78565c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

luni/src/main/java/libcore/icu/ICU.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ private static void parseLangScriptRegionAndVariants(String string,
166166
}
167167
}
168168

169+
/**
170+
* The new code from master breaks libcore.icu.ICUTest#test_localeFromString,
171+
* which expects the old API. Retain this for 4.4
172+
*/
173+
public static Locale localeFromString(String localeName) {
174+
return localeFromIcuLocaleId(localeName);
175+
}
176+
169177
/**
170178
* Returns the appropriate {@code Locale} given a {@code String} of the form returned
171179
* by {@code toString}. This is very lenient, and doesn't care what's between the underscores:

0 commit comments

Comments
 (0)