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

Commit a707b2a3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use setFontVariationOverride in TextView" into main

parents bb13b093 19bd4b60
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -5211,8 +5211,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
     */
    @Nullable
    public String getFontVariationSettings() {
        if (Flags.typefaceRedesignReadonly()) {
            return mTextPaint.getFontVariationOverride();
        } else {
            return mTextPaint.getFontVariationSettings();
        }
    }
    /**
     * Sets the break strategy for breaking paragraphs into lines. The default value for
@@ -5567,10 +5571,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                            Math.clamp(400 + mFontWeightAdjustment,
                                    FontStyle.FONT_WEIGHT_MIN, FontStyle.FONT_WEIGHT_MAX)));
                }
                mTextPaint.setFontVariationSettings(
                mTextPaint.setFontVariationOverride(
                        FontVariationAxis.toFontVariationSettings(axes));
            } else {
                mTextPaint.setFontVariationSettings(fontVariationSettings);
                mTextPaint.setFontVariationOverride(fontVariationSettings);
            }
            effective = true;
        } else {