diff options
author | Benjamin Poiesz <bpoiesz@google.com> | 2013-04-04 16:14:13 -0700 |
---|---|---|
committer | Benjamin Poiesz <bpoiesz@google.com> | 2013-04-11 13:32:39 -0700 |
commit | cbde502ebb2ffe00eec713a91e1f05d753b2b603 (patch) | |
tree | 458802b62afad7f3fbf09570ced3c409a20b85e4 /src/com/android | |
parent | 3c3fa0ccb8bf9f62558202e909cc158a2e673e37 (diff) | |
download | packages_apps_Settings-cbde502ebb2ffe00eec713a91e1f05d753b2b603.zip packages_apps_Settings-cbde502ebb2ffe00eec713a91e1f05d753b2b603.tar.gz packages_apps_Settings-cbde502ebb2ffe00eec713a91e1f05d753b2b603.tar.bz2 |
Forcing the settings apk to be built with the zz_ZZ pseudolocale.
This will enable Settings to show the effects of the zz_ZZ pseudolocale when selected in the LocalePicker.
Bug #8556677
Change-Id: I68ffc81454865dec94a3c1460019d1efce00ea49
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/settings/LocalePicker.java | 11 | ||||
-rw-r--r-- | src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java | 11 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/com/android/settings/LocalePicker.java b/src/com/android/settings/LocalePicker.java index 8ea99a1..6600703 100644 --- a/src/com/android/settings/LocalePicker.java +++ b/src/com/android/settings/LocalePicker.java @@ -23,8 +23,10 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; +import android.content.Context; import com.android.settings.SettingsPreferenceFragment.SettingsDialogFragment; +import com.android.settings.DevelopmentSettings; import java.util.Locale; @@ -46,6 +48,15 @@ public class LocalePicker extends com.android.internal.app.LocalePicker } @Override + protected boolean isInDeveloperMode() { + final boolean showDev = getActivity().getSharedPreferences(DevelopmentSettings.PREF_FILE, + Context.MODE_PRIVATE).getBoolean( + DevelopmentSettings.PREF_SHOW, + android.os.Build.TYPE.equals("eng")); + return showDev; + } + + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState != null && savedInstanceState.containsKey(SAVE_TARGET_LOCALE)) { diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java index c2ff0d9..2a5adb1 100644 --- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java +++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java @@ -238,7 +238,16 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment // and want to pretend that the language is valid for all locales. // We need a way to support languages that aren't tied to a particular // locale instead of hiding the locale qualifier. - if (hasOnlyOneLanguageInstance(language, + if (language.equals("zz")) { + String country = conf.locale.getCountry(); + if (country.equals("ZZ")) { + localeString = "[Developer] Accented English (zz_ZZ)"; + } else if (country.equals("ZY")) { + localeString = "[Developer] Fake Bi-Directional (zz_ZY)"; + } else { + localeString = ""; + } + } else if (hasOnlyOneLanguageInstance(language, Resources.getSystem().getAssets().getLocales())) { localeString = conf.locale.getDisplayLanguage(conf.locale); } else { |