Loading core/java/android/widget/TextView.java +20 −13 Original line number Diff line number Diff line Loading @@ -912,11 +912,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener break; case com.android.internal.R.styleable.TextAppearance_fontFamily: if (!context.isRestricted()) { try { fontTypeface = appearance.getFont(attr); } catch (UnsupportedOperationException | Resources.NotFoundException e) { } catch (UnsupportedOperationException | Resources.NotFoundException e) { // Expected if it is not a font resource. } } if (fontTypeface == null) { fontFamily = appearance.getString(attr); } Loading Loading @@ -1229,12 +1232,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener break; case com.android.internal.R.styleable.TextView_fontFamily: if (!context.isRestricted()) { try { fontTypeface = a.getFont(attr); } catch (UnsupportedOperationException | Resources.NotFoundException e) { // Expected if it is not a resource reference or if it is a reference to // another resource type. } } if (fontTypeface == null) { fontFamily = a.getString(attr); } Loading Loading @@ -3380,11 +3385,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener Typeface fontTypeface = null; String fontFamily = null; if (!context.isRestricted()) { try { fontTypeface = ta.getFont(R.styleable.TextAppearance_fontFamily); } catch (UnsupportedOperationException | Resources.NotFoundException e) { // Expected if it is not a font resource. } } if (fontTypeface == null) { fontFamily = ta.getString(R.styleable.TextAppearance_fontFamily); } Loading Loading
core/java/android/widget/TextView.java +20 −13 Original line number Diff line number Diff line Loading @@ -912,11 +912,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener break; case com.android.internal.R.styleable.TextAppearance_fontFamily: if (!context.isRestricted()) { try { fontTypeface = appearance.getFont(attr); } catch (UnsupportedOperationException | Resources.NotFoundException e) { } catch (UnsupportedOperationException | Resources.NotFoundException e) { // Expected if it is not a font resource. } } if (fontTypeface == null) { fontFamily = appearance.getString(attr); } Loading Loading @@ -1229,12 +1232,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener break; case com.android.internal.R.styleable.TextView_fontFamily: if (!context.isRestricted()) { try { fontTypeface = a.getFont(attr); } catch (UnsupportedOperationException | Resources.NotFoundException e) { // Expected if it is not a resource reference or if it is a reference to // another resource type. } } if (fontTypeface == null) { fontFamily = a.getString(attr); } Loading Loading @@ -3380,11 +3385,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener Typeface fontTypeface = null; String fontFamily = null; if (!context.isRestricted()) { try { fontTypeface = ta.getFont(R.styleable.TextAppearance_fontFamily); } catch (UnsupportedOperationException | Resources.NotFoundException e) { // Expected if it is not a font resource. } } if (fontTypeface == null) { fontFamily = ta.getString(R.styleable.TextAppearance_fontFamily); } Loading