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

Commit 576ee7de authored by Clara Bayarri's avatar Clara Bayarri
Browse files

Fix textStyle being ignored for Font resources in TextView

When a font resource is set via fontFamily, the textStyle
attribute was being ignored.

Bug: 36505747
Test: cts attached in topic
Change-Id: I6418297d9a289460a3b36c6883441ac48ea33b22
parent 2821eeae
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2031,6 +2031,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        Typeface tf = fontTypeface;
        if (tf == null && familyName != null) {
            tf = Typeface.create(familyName, styleIndex);
        } else if (tf != null && tf.getStyle() != styleIndex) {
            tf = Typeface.create(tf, styleIndex);
        }
        if (tf != null) {
            setTypeface(tf);