diff options
author | Amith Yamasani <yamasani@google.com> | 2010-02-17 16:02:39 -0800 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2010-02-17 16:02:39 -0800 |
commit | 0f2e6dec7c8dc136783eacb5b62c9d3248c4845a (patch) | |
tree | ce62e75cffe33011cda59fb88a267b8c846f1818 /src/com/android/settings/LanguageSettings.java | |
parent | 5435511ee9151dbca8ad13656b3dc20ec79f940b (diff) | |
download | packages_apps_settings-0f2e6dec7c8dc136783eacb5b62c9d3248c4845a.zip packages_apps_settings-0f2e6dec7c8dc136783eacb5b62c9d3248c4845a.tar.gz packages_apps_settings-0f2e6dec7c8dc136783eacb5b62c9d3248c4845a.tar.bz2 |
Show current locale as summary for Select language setting.
Bug: 2402834
Diffstat (limited to 'src/com/android/settings/LanguageSettings.java')
-rw-r--r-- | src/com/android/settings/LanguageSettings.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/settings/LanguageSettings.java b/src/com/android/settings/LanguageSettings.java index 1b9f0c1..61ede0d 100644 --- a/src/com/android/settings/LanguageSettings.java +++ b/src/com/android/settings/LanguageSettings.java @@ -43,10 +43,12 @@ import java.util.List; public class LanguageSettings extends PreferenceActivity { + private static final String KEY_PHONE_LANGUAGE = "phone_language"; private boolean mHaveHardKeyboard; private List<InputMethodInfo> mInputMethodProperties; private List<CheckBoxPreference> mCheckboxes; + private Preference mLanguagePref; final TextUtils.SimpleStringSplitter mStringColonSplitter = new TextUtils.SimpleStringSplitter(':'); @@ -67,6 +69,8 @@ public class LanguageSettings extends PreferenceActivity { if (getAssets().getLocales().length == 1) { getPreferenceScreen(). removePreference(findPreference("language_category")); + } else { + mLanguagePref = findPreference(KEY_PHONE_LANGUAGE); } Configuration config = getResources().getConfiguration(); @@ -156,6 +160,15 @@ public class LanguageSettings extends PreferenceActivity { } } mLastTickedInputMethodId = null; + + if (mLanguagePref != null) { + Configuration conf = getResources().getConfiguration(); + String locale = conf.locale.getDisplayName(conf.locale); + if (locale != null && locale.length() > 1) { + locale = Character.toUpperCase(locale.charAt(0)) + locale.substring(1); + mLanguagePref.setSummary(locale); + } + } } @Override |