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

Commit 6402dc7e authored by Raph Levien's avatar Raph Levien Committed by Android (Google) Code Review
Browse files

Merge "Clear all StaticLayout.Builder fields on pool recycle" into mnc-dev

parents 03dbaf15 3bd60c7b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ public class StaticLayout extends Layout {
            b.mEllipsizedWidth = width;
            b.mEllipsize = null;
            b.mMaxLines = Integer.MAX_VALUE;
            b.mBreakStrategy = Layout.BREAK_STRATEGY_SIMPLE;

            b.mMeasuredText = MeasuredText.obtain();
            return b;
@@ -100,6 +101,8 @@ public class StaticLayout extends Layout {
            b.mPaint = null;
            b.mText = null;
            MeasuredText.recycle(b.mMeasuredText);
            b.mMeasuredText = null;
            nFinishBuilder(b.mNativePtr);
            sPool.release(b);
        }