Commit 79f2c11e authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Fix OS's large font setting not being respected

Bug: 834191
Change-Id: I3a0d79f4d281e426d41951080eb4551b646aab92
Reviewed-on: https://chromium-review.googlesource.com/1054731
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557927}
parent e1762839
......@@ -119,6 +119,10 @@ public abstract class AsyncInitializationActivity extends AppCompatActivity impl
int targetSmallestScreenWidthDp =
DisplayUtil.pxToDp(display, DisplayUtil.getSmallestWidth(display));
Configuration config = new Configuration();
// Pre-Android O, fontScale gets initialized to 1 in the constructor. Set it to 0 so
// that applyOverrideConfiguration() does not interpret it as an overridden value.
// https://crbug.com/834191
config.fontScale = 0;
config.smallestScreenWidthDp = targetSmallestScreenWidthDp;
applyOverrideConfiguration(config);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment