Merge "Change Font.Builder#build return type from @Nullable to @NonNull"

This commit is contained in:
TreeHugger Robot
2019-03-13 23:01:14 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -15802,7 +15802,7 @@ package android.graphics.fonts {
ctor public Font.Builder(@NonNull android.os.ParcelFileDescriptor, @IntRange(from=0) long, @IntRange(from=0xffffffff) long);
ctor public Font.Builder(@NonNull android.content.res.AssetManager, @NonNull String);
ctor public Font.Builder(@NonNull android.content.res.Resources, int);
method @Nullable public android.graphics.fonts.Font build() throws java.io.IOException;
method @NonNull public android.graphics.fonts.Font build() throws java.io.IOException;
method @NonNull public android.graphics.fonts.Font.Builder setFontVariationSettings(@Nullable String);
method @NonNull public android.graphics.fonts.Font.Builder setFontVariationSettings(@Nullable android.graphics.fonts.FontVariationAxis[]);
method @NonNull public android.graphics.fonts.Font.Builder setSlant(int);

View File

@@ -360,7 +360,7 @@ public final class Font {
*
* @return the Font object
*/
public @Nullable Font build() throws IOException {
public @NonNull Font build() throws IOException {
if (mException != null) {
throw new IOException("Failed to read font contents", mException);
}