Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f80b3c09 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "Rmove @UnsupportedAppUsage""

parents 361ed770 fe7b206c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.graphics;

import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetManager;
import android.graphics.fonts.FontVariationAxis;
import android.text.TextUtils;
@@ -57,6 +58,7 @@ public class FontFamily {
     *
     * This cannot be deleted because it's in use by AndroidX.
     */
    @UnsupportedAppUsage(trackingBug = 123768928)
    public long mNativePtr;

    // Points native font family builder. Must be zero after freezing this family.
@@ -65,6 +67,7 @@ public class FontFamily {
    /**
     * This cannot be deleted because it's in use by AndroidX.
     */
    @UnsupportedAppUsage(trackingBug = 123768928)
    public FontFamily() {
        mBuilderPtr = nInitBuilder(null, 0);
        mNativeBuilderCleaner = sBuilderRegistry.registerNativeAllocation(this, mBuilderPtr);
@@ -73,6 +76,7 @@ public class FontFamily {
    /**
     * This cannot be deleted because it's in use by AndroidX.
     */
    @UnsupportedAppUsage(trackingBug = 123768928)
    public FontFamily(@Nullable String[] langs, int variant) {
        final String langsString;
        if (langs == null || langs.length == 0) {
@@ -94,6 +98,7 @@ public class FontFamily {
     *
     * This cannot be deleted because it's in use by AndroidX.
     */
    @UnsupportedAppUsage(trackingBug = 123768928)
    public boolean freeze() {
        if (mBuilderPtr == 0) {
            throw new IllegalStateException("This FontFamily is already frozen");
@@ -110,6 +115,7 @@ public class FontFamily {
    /**
     * This cannot be deleted because it's in use by AndroidX.
     */
    @UnsupportedAppUsage(trackingBug = 123768928)
    public void abortCreation() {
        if (mBuilderPtr == 0) {
            throw new IllegalStateException("This FontFamily is already frozen or abandoned");
@@ -121,6 +127,7 @@ public class FontFamily {
    /**
     * This cannot be deleted because it's in use by AndroidX.
     */
    @UnsupportedAppUsage(trackingBug = 123768928)
    public boolean addFont(String path, int ttcIndex, FontVariationAxis[] axes, int weight,
            int italic) {
        if (mBuilderPtr == 0) {
@@ -144,6 +151,7 @@ public class FontFamily {
    /**
     * This cannot be deleted because it's in use by AndroidX.
     */
    @UnsupportedAppUsage(trackingBug = 123768928)
    public boolean addFontFromBuffer(ByteBuffer font, int ttcIndex, FontVariationAxis[] axes,
            int weight, int italic) {
        if (mBuilderPtr == 0) {
@@ -171,6 +179,7 @@ public class FontFamily {
     *
     * This cannot be deleted because it's in use by AndroidX.
     */
    @UnsupportedAppUsage(trackingBug = 123768928)
    public boolean addFontFromAssetManager(AssetManager mgr, String path, int cookie,
            boolean isAsset, int ttcIndex, int weight, int isItalic,
            FontVariationAxis[] axes) {