This feature is not built into the Android SDK. Instead, I wrote a version you can use, available here. Basically, it takes the table in the above answer and ports it to a Map<String, Map<String, String>>
containing the useful information, then a simple lookup method is used. To use this class in your project, just call:
String script = LocaleUtilities.getScript(Locale.getDefault());
to get the script for the default locale.