Switch TextUtils over to new ICU API.

.. and use Locale.getScript() instead of ICU.getScript.

bug: 15876704
Change-Id: Idf9462d8ef568dbc88c95e65a971184952e97872
This commit is contained in:
Narayan Kamath
2014-07-30 16:51:27 +01:00
parent 6a58309e73
commit 08b3516984

View File

@@ -1737,7 +1737,7 @@ public class TextUtils {
*/
public static int getLayoutDirectionFromLocale(Locale locale) {
if (locale != null && !locale.equals(Locale.ROOT)) {
final String scriptSubtag = ICU.getScript(ICU.addLikelySubtags(locale.toString()));
final String scriptSubtag = ICU.addLikelySubtags(locale).getScript();
if (scriptSubtag == null) return getLayoutDirectionFromFirstChar(locale);
if (scriptSubtag.equalsIgnoreCase(ARAB_SCRIPT_SUBTAG) ||