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

Commit 2d78054c authored by Sally's avatar Sally
Browse files

Set new user's default font weight adjustment to 0

Ideally we would use an undefined value like
Configuration.FONT_WEIGHT_ADJUSTMENT_UNDEFINED to represent the undefined
setting but undefined config values do not trigger configuration updates
(which we need on a user change)

Bug: 174605763
Test: switch to new user
Change-Id: I73e6456427e3f05d02182e9544fe54cd44640e2e
parent 5e3a6848
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3060,6 +3060,7 @@ public final class Settings {
        // com.android.providers.settings.SettingsProtoDumpUtil#dumpProtoSystemSettingsLocked.
        private static final float DEFAULT_FONT_SCALE = 1.0f;
        private static final int DEFAULT_FONT_WEIGHT = 0;
        /**
         * The content:// style URL for this table
@@ -3581,9 +3582,7 @@ public final class Settings {
                outConfig.fontScale = DEFAULT_FONT_SCALE;
            }
            outConfig.fontWeightAdjustment = Settings.Secure.getIntForUser(
                    cr, Settings.Secure.FONT_WEIGHT_ADJUSTMENT,
                    Configuration.FONT_WEIGHT_ADJUSTMENT_UNDEFINED,
                    userHandle);
                    cr, Settings.Secure.FONT_WEIGHT_ADJUSTMENT, DEFAULT_FONT_WEIGHT, userHandle);
            final String localeValue =
                    Settings.System.getStringForUser(cr, SYSTEM_LOCALES, userHandle);