summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt1
-rw-r--r--api/system-current.txt1
-rw-r--r--api/test-current.txt1
-rw-r--r--core/java/android/provider/FontsContract.java37
4 files changed, 0 insertions, 40 deletions
diff --git a/api/current.txt b/api/current.txt
index 9d440e648bcb..9f3983d4e1e0 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -34421,7 +34421,6 @@ package android.provider {
}
public class FontsContract {
- method public static android.graphics.Typeface buildTypeface(android.content.Context, android.os.CancellationSignal, android.provider.FontsContract.FontInfo[], int, boolean, java.lang.String);
method public static android.graphics.Typeface buildTypeface(android.content.Context, android.os.CancellationSignal, android.provider.FontsContract.FontInfo[]);
method public static android.provider.FontsContract.FontFamilyResult fetchFonts(android.content.Context, android.os.CancellationSignal, android.provider.FontRequest) throws android.content.pm.PackageManager.NameNotFoundException;
method public static void requestFonts(android.content.Context, android.provider.FontRequest, android.os.Handler, android.os.CancellationSignal, android.provider.FontsContract.FontRequestCallback);
diff --git a/api/system-current.txt b/api/system-current.txt
index 0a9a5df0fc31..297eff345ffd 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -37412,7 +37412,6 @@ package android.provider {
}
public class FontsContract {
- method public static android.graphics.Typeface buildTypeface(android.content.Context, android.os.CancellationSignal, android.provider.FontsContract.FontInfo[], int, boolean, java.lang.String);
method public static android.graphics.Typeface buildTypeface(android.content.Context, android.os.CancellationSignal, android.provider.FontsContract.FontInfo[]);
method public static android.provider.FontsContract.FontFamilyResult fetchFonts(android.content.Context, android.os.CancellationSignal, android.provider.FontRequest) throws android.content.pm.PackageManager.NameNotFoundException;
method public static void requestFonts(android.content.Context, android.provider.FontRequest, android.os.Handler, android.os.CancellationSignal, android.provider.FontsContract.FontRequestCallback);
diff --git a/api/test-current.txt b/api/test-current.txt
index 862ce61728ea..d3f6c54aafa6 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -34557,7 +34557,6 @@ package android.provider {
}
public class FontsContract {
- method public static android.graphics.Typeface buildTypeface(android.content.Context, android.os.CancellationSignal, android.provider.FontsContract.FontInfo[], int, boolean, java.lang.String);
method public static android.graphics.Typeface buildTypeface(android.content.Context, android.os.CancellationSignal, android.provider.FontsContract.FontInfo[]);
method public static android.provider.FontsContract.FontFamilyResult fetchFonts(android.content.Context, android.os.CancellationSignal, android.provider.FontRequest) throws android.content.pm.PackageManager.NameNotFoundException;
method public static void requestFonts(android.content.Context, android.provider.FontRequest, android.os.Handler, android.os.CancellationSignal, android.provider.FontsContract.FontRequestCallback);
diff --git a/core/java/android/provider/FontsContract.java b/core/java/android/provider/FontsContract.java
index 6c038c787d59..1013b0f0af23 100644
--- a/core/java/android/provider/FontsContract.java
+++ b/core/java/android/provider/FontsContract.java
@@ -607,43 +607,6 @@ public class FontsContract {
}
/**
- * Build a Typeface from an array of {@link FontInfo}. Results that are marked as not ready
- * will be skipped.
- *
- * @param context A {@link Context} that will be used to fetch the font contents.
- * @param cancellationSignal A signal to cancel the operation in progress, or null if none. If
- * the operation is canceled, then {@link
- * android.os.OperationCanceledException} will be thrown.
- * @param fonts An array of {@link FontInfo} to be used to create a Typeface.
- * @param weight A weight value to be used for selecting a font from a font family.
- * @param italic {@code true} if this font is of italic style. This will be used for font
- * selection from a font family.
- * @param fallbackFontName A fallback font name used if this method fails to create the
- * Typeface. By passing {@code null}, this method returns {@code null}
- * if typeface creation fails.
- * @return A Typeface object. May return {@code null} if that is the value passed to {@code
- * fallBackFontName}.
- */
- public static Typeface buildTypeface(@NonNull Context context,
- @Nullable CancellationSignal cancellationSignal, @NonNull FontInfo[] fonts,
- int weight, boolean italic, @Nullable String fallbackFontName) {
- if (context.isRestricted()) {
- // TODO: Should we allow if the peer process is system or myself?
- return null;
- }
- final Map<Uri, ByteBuffer> uriBuffer =
- prepareFontData(context, fonts, cancellationSignal);
- if (uriBuffer.isEmpty()) {
- return null;
- }
- return new Typeface.Builder(fonts, uriBuffer)
- .setFallback(fallbackFontName)
- .setWeight(weight)
- .setItalic(italic)
- .build();
- }
-
- /**
* Build a Typeface from an array of {@link FontInfo}
*
* Results that are marked as not ready will be skipped.