summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sally <sallyyuen@google.com> 2020-12-02 22:11:17 +0000
committer Sally <sallyyuen@google.com> 2020-12-02 22:11:17 +0000
commit2d78054c3a8693b7f6f581ec22ad6d91058d32df (patch)
treecf936d084e0d28aa00bb6d4dd07ae6074e00a987
parent5e3a68488e76d5e147ce26bfd201da6d3a874034 (diff)
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
-rw-r--r--core/java/android/provider/Settings.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 249a781509ac..f2ef175e8f09 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -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);