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

Commit 1446f895 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Fix unexpected line break

useBoundsForWidth should not be used in JetpackCompose but
unexpectedly enabled because of the uncleared member variable during
recycling StaticLayout.Builder instance.

Bug: 391378120
Test: atest StaticLayoutTest
Flag: EXEMPT bugfix
Change-Id: I0b75dc41a6f1aba123edabbae000cc824b4edfbb
parent 3791a5a9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ public class StaticLayout extends Layout {
            b.mHyphenationFrequency = Layout.HYPHENATION_FREQUENCY_NONE;
            b.mJustificationMode = Layout.JUSTIFICATION_MODE_NONE;
            b.mLineBreakConfig = LineBreakConfig.NONE;
            b.mUseBoundsForWidth = false;
            b.mMinimumFontMetrics = null;
            return b;
        }