am bb97753b: Merge "Switch TextUtils over to new ICU API."

* commit 'bb97753bc546c7725652b68e6611a75350573466':
  Switch TextUtils over to new ICU API.
This commit is contained in:
Narayan Kamath
2014-07-31 11:34:49 +00:00
committed by Android Git Automerger

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) ||