Merge "Stop font loading with restricted context." into oc-mr1-dev

This commit is contained in:
TreeHugger Robot
2017-07-31 18:23:04 +00:00
committed by Android (Google) Code Review

View File

@@ -70,7 +70,11 @@ public class TextAppearanceSpan extends MetricAffectingSpan implements Parcelabl
TextAppearance_textSize, -1);
mStyle = a.getInt(com.android.internal.R.styleable.TextAppearance_textStyle, 0);
mTypeface = a.getFont(com.android.internal.R.styleable.TextAppearance_fontFamily);
if (!context.isRestricted() && context.canLoadUnsafeResources()) {
mTypeface = a.getFont(com.android.internal.R.styleable.TextAppearance_fontFamily);
} else {
mTypeface = null;
}
if (mTypeface != null) {
mFamilyName = null;
} else {