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

Commit 98cb80d6 authored by Raph Levien's avatar Raph Levien Committed by android-build-merger
Browse files

am 2ed9a7e5: am af461e12: Merge "Refine resolution order for typeface and...

am 2ed9a7e5: am af461e12: Merge "Refine resolution order for typeface and fontFamily" into lmp-mr1-dev
automerge: 35b5780e

* commit '35b5780e':
  Refine resolution order for typeface and fontFamily
parents 9f74b337 35b5780e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -665,6 +665,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        ColorStateList textColorLink = null;
        int textSize = 15;
        String fontFamily = null;
        boolean fontFamilyExplicit = false;
        int typefaceIndex = -1;
        int styleIndex = -1;
        boolean allCaps = false;
@@ -1029,6 +1030,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener

            case com.android.internal.R.styleable.TextView_fontFamily:
                fontFamily = a.getString(attr);
                fontFamilyExplicit = true;
                break;

            case com.android.internal.R.styleable.TextView_password:
@@ -1333,6 +1335,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
            typefaceIndex = MONOSPACE;
        }

        if (typefaceIndex != -1 && !fontFamilyExplicit) {
            fontFamily = null;
        }
        setTypefaceFromAttrs(fontFamily, typefaceIndex, styleIndex);

        if (shadowcolor != 0) {