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

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

Merge "Fix Paint.reset method inconsistency" into main

parents 680fadde ba84a10f
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -239,3 +239,10 @@ flag {
  bug: "430485331"
  bug: "430485331"
}
}


flag {
  name: "fix_paint_reset_inconsistency"
  namespace: "text"
  description: "Paint.reset method clears members but some of them doesn't clear in native members. Call setter to clear members and native instances."
  bug: "417989314"

}
+7 −1
Original line number Original line Diff line number Diff line
@@ -753,7 +753,13 @@ public class Paint {
        setTextLocales(LocaleList.getAdjustedDefault());
        setTextLocales(LocaleList.getAdjustedDefault());
        resetElegantTextHeight();
        resetElegantTextHeight();
        mFontFeatureSettings = null;
        mFontFeatureSettings = null;
        if (com.android.text.flags.Flags.fixPaintResetInconsistency()) {
            setFontVariationSettings(null);
            setFontVariationOverride(null);
            setTypeface(null);
        } else {
            mFontVariationSettings = null;
            mFontVariationSettings = null;
        }


        mShadowLayerRadius = 0.0f;
        mShadowLayerRadius = 0.0f;
        mShadowLayerDx = 0.0f;
        mShadowLayerDx = 0.0f;