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

Commit 9d187867 authored by Narayan Kamath's avatar Narayan Kamath Committed by Android (Google) Code Review
Browse files

Merge "Don't set userSetLocale from Configuration.setLocale."

parents 9b817871 70392818
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1284,14 +1284,12 @@ public final class Configuration implements Parcelable, Comparable<Configuration

    /**
     * Set the locale. This is the preferred way for setting up the locale (instead of using the
     * direct accessor). This will also set the userLocale and layout direction according to
     * the locale.
     * direct accessor). This will also set the layout direction according to the locale.
     *
     * @param loc The locale. Can be null.
     */
    public void setLocale(Locale loc) {
        locale = loc;
        userSetLocale = true;
        setLayoutDirection(locale);
    }

+1 −2
Original line number Diff line number Diff line
@@ -246,9 +246,8 @@ public class LocalePicker extends ListFragment {
            IActivityManager am = ActivityManagerNative.getDefault();
            Configuration config = am.getConfiguration();

            // Will set userSetLocale to indicate this isn't some passing default - the user
            // wants this remembered
            config.setLocale(locale);
            config.userSetLocale = true;

            am.updateConfiguration(config);
            // Trigger the dirty bit for the Settings Provider.
+1 −1
Original line number Diff line number Diff line
@@ -2217,7 +2217,7 @@ public final class ActivityManagerService extends ActivityManagerNative
        mTrackingAssociations = "1".equals(SystemProperties.get("debug.track-associations"));
        mConfiguration.setToDefaults();
        mConfiguration.locale = Locale.getDefault();
        mConfiguration.setLocale(Locale.getDefault());
        mConfigurationSeq = mConfiguration.seq = 1;
        mProcessCpuTracker.init();