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

Commit 9714ec85 authored by Jeremy Meyer's avatar Jeremy Meyer Committed by Android (Google) Code Review
Browse files

Merge "Add some logging around locale changes" into main

parents 843707be 8419c97d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2358,8 +2358,13 @@ public final class Configuration implements Parcelable, Comparable<Configuration
     * @param locales The locale list. If null, an empty LocaleList will be assigned.
     */
    public void setLocales(@Nullable LocaleList locales) {
        LocaleList oldList = mLocaleList;
        mLocaleList = locales == null ? LocaleList.getEmptyLocaleList() : locales;
        locale = mLocaleList.get(0);
        if (!mLocaleList.equals(oldList)) {
            Slog.v(TAG, "Updating configuration, locales updated from " + oldList
                    + " to " + mLocaleList);
        }
        setLayoutDirection(locale);
    }

+3 −0
Original line number Diff line number Diff line
@@ -491,6 +491,9 @@ public class ResourcesImpl {
                            }
                            defaultLocale =
                                    adjustLanguageTag(lc.getDefaultLocale().toLanguageTag());
                            Slog.v(TAG, "Updating configuration, with default locale "
                                    + defaultLocale + " and selected locales "
                                    + Arrays.toString(selectedLocales));
                        } else {
                            String[] availableLocales;
                            // The LocaleList has changed. We must query the AssetManager's