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

am: 06ba486a74

Change-Id: I0c668e01f9fe254b6bedace52d19bd7bcb5d5f1f
This commit is contained in:
Seigo Nonaka
2017-07-31 18:36:49 +00:00
committed by android-build-merger

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 {