Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0746763 authored by Benjamin Poiesz's avatar Benjamin Poiesz Committed by Android (Google) Code Review
Browse files

Merge "Forcing the settings apk to be built with the zz_ZZ pseudolocale. This...

Merge "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." into jb-mr2-dev
parents d8b0d0ed cbde502e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ LOCAL_CERTIFICATE := platform

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

LOCAL_AAPT_FLAGS += -c zz_ZZ

include $(BUILD_PACKAGE)

# Use the folloing include to make our test apk.
+11 −0
Original line number Diff line number Diff line
@@ -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;

@@ -45,6 +47,15 @@ public class LocalePicker extends com.android.internal.app.LocalePicker
        setLocaleSelectionListener(this);
    }

    @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);
+10 −1
Original line number Diff line number Diff line
@@ -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 {