From 810541e7c0022ce4047e49aa5e721d40918f3dbb Mon Sep 17 00:00:00 2001 From: jeremymuhia Date: Thu, 3 Feb 2022 09:09:51 -0800 Subject: [PATCH] [TypefaceUtils] clean up code smell PiperOrigin-RevId: 426161045 --- .../material/resources/TypefaceUtils.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/java/com/google/android/material/resources/TypefaceUtils.java b/lib/java/com/google/android/material/resources/TypefaceUtils.java index 4932c20debc..360ade9d068 100644 --- a/lib/java/com/google/android/material/resources/TypefaceUtils.java +++ b/lib/java/com/google/android/material/resources/TypefaceUtils.java @@ -38,7 +38,14 @@ public class TypefaceUtils { private TypefaceUtils() {} - // Clones a typeface with additional boldness (weight). + /** Clones a typeface with additional boldness (weight). */ + @Nullable + public static Typeface maybeCopyWithFontWeightAdjustment( + @NonNull Context context, @NonNull Typeface typeface) { + return maybeCopyWithFontWeightAdjustment(context.getResources().getConfiguration(), typeface); + } + + /** Clones a typeface with additional boldness (weight). */ @Nullable public static Typeface maybeCopyWithFontWeightAdjustment( @NonNull Configuration configuration, @NonNull Typeface typeface) { @@ -54,11 +61,4 @@ public static Typeface maybeCopyWithFontWeightAdjustment( } return null; } - - // Clones a typeface with additional boldness (weight). - @Nullable - public static Typeface maybeCopyWithFontWeightAdjustment( - @NonNull Context context, @NonNull Typeface typeface) { - return maybeCopyWithFontWeightAdjustment(context.getResources().getConfiguration(), typeface); - } }