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

Commit 77aaa94b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix bug where font size (etc.) doesn't change after changing display...

Merge "Fix bug where font size (etc.) doesn't change after changing display settings." into ub-launcher3-rvc-dev
parents 50f2a6c7 7772fcde
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ public class InvariantDeviceProfile {
                DefaultDisplay.INSTANCE.get(context).getInfo(),
                getPredefinedDeviceProfiles(context, gridName));

        Info myInfo = new Info(display);
        Info myInfo = new Info(context, display);
        DisplayOption myDisplayOption = invDistWeightedInterpolate(
                myInfo, getPredefinedDeviceProfiles(context, gridName));

+5 −4
Original line number Diff line number Diff line
@@ -145,10 +145,11 @@ public class DefaultDisplay implements DisplayListener {
        }

        private Info(Context context) {
            this(context.getSystemService(DisplayManager.class).getDisplay(DEFAULT_DISPLAY));
            this(context, context.getSystemService(DisplayManager.class)
                    .getDisplay(DEFAULT_DISPLAY));
        }

        public Info(Display display) {
        public Info(Context context, Display display) {
            id = display.getDisplayId();
            rotation = display.getRotation();

@@ -161,8 +162,8 @@ public class DefaultDisplay implements DisplayListener {
            display.getRealSize(realSize);
            display.getCurrentSizeRange(smallestSize, largestSize);

            metrics = new DisplayMetrics();
            display.getMetrics(metrics);
            Context defaultDisplayContext = context.createDisplayContext(display);
            metrics = defaultDisplayContext.getResources().getDisplayMetrics();
        }

        private boolean hasDifferentSize(Info info) {