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

Commit 8419c97d authored by Jeremy Meyer's avatar Jeremy Meyer
Browse files

Add some logging around locale changes

Test: automated
Bug: 392255526
Flag: EXEMPT bugfix
Change-Id: I6f3ee4bddc8d3a4ca32094af4c5d124a1904242a
parent 36c9695d
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