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

Commit ba84a10f authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Fix Paint.reset method inconsistency

Bug: 417989314
Test: atest PaintTest
Flag: com.android.text.flags.fix_paint_reset_inconsistency
Change-Id: Ibbbb053ef869ead20a7f20d8dd31c5e19937c726
parent 1ccb65c2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -239,3 +239,10 @@ flag {
  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 Diff line number Diff line
@@ -753,7 +753,13 @@ public class Paint {
        setTextLocales(LocaleList.getAdjustedDefault());
        resetElegantTextHeight();
        mFontFeatureSettings = null;
        if (com.android.text.flags.Flags.fixPaintResetInconsistency()) {
            setFontVariationSettings(null);
            setFontVariationOverride(null);
            setTypeface(null);
        } else {
            mFontVariationSettings = null;
        }

        mShadowLayerRadius = 0.0f;
        mShadowLayerDx = 0.0f;