diff options
| -rw-r--r-- | api/current.txt | 1 | ||||
| -rw-r--r-- | graphics/java/android/graphics/Typeface.java | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt index 26fe641c59da..9b492bcf422d 100644 --- a/api/current.txt +++ b/api/current.txt @@ -14436,6 +14436,7 @@ package android.graphics { method public static android.graphics.Typeface createFromFile(java.lang.String); method public static android.graphics.Typeface defaultFromStyle(int); method public int getStyle(); + method public int getWeight(); method public final boolean isBold(); method public final boolean isItalic(); field public static final int BOLD = 1; // 0x1 diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java index 925073dac6c7..20c22b720717 100644 --- a/graphics/java/android/graphics/Typeface.java +++ b/graphics/java/android/graphics/Typeface.java @@ -167,10 +167,8 @@ public class Typeface { nativeSetDefault(t.native_instance); } - // TODO: Make this public API. (b/64852739) - /** @hide */ - @VisibleForTesting - public int getWeight() { + /** Returns the typeface's weight value */ + public @IntRange(from = 0, to = 1000) int getWeight() { return mWeight; } |