Merge "Font API clean up" into oc-dev
This commit is contained in:
@@ -14392,18 +14392,6 @@ package android.graphics.drawable.shapes {
|
||||
|
||||
package android.graphics.fonts {
|
||||
|
||||
public final class FontRequest implements android.os.Parcelable {
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String);
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String, java.util.List<java.util.List<byte[]>>);
|
||||
method public int describeContents();
|
||||
method public java.util.List<java.util.List<byte[]>> getCertificates();
|
||||
method public java.lang.String getProviderAuthority();
|
||||
method public java.lang.String getProviderPackage();
|
||||
method public java.lang.String getQuery();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.graphics.fonts.FontRequest> CREATOR;
|
||||
}
|
||||
|
||||
public final class FontVariationAxis {
|
||||
ctor public FontVariationAxis(java.lang.String, float) throws android.graphics.fonts.FontVariationAxis.InvalidFormatException;
|
||||
method public static android.graphics.fonts.FontVariationAxis[] fromFontVariationSettings(java.lang.String) throws android.graphics.fonts.FontVariationAxis.InvalidFormatException;
|
||||
@@ -34423,11 +34411,20 @@ package android.provider {
|
||||
method public final int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
|
||||
}
|
||||
|
||||
public final class FontRequest {
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String);
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String, java.util.List<java.util.List<byte[]>>);
|
||||
method public java.util.List<java.util.List<byte[]>> getCertificates();
|
||||
method public java.lang.String getProviderAuthority();
|
||||
method public java.lang.String getProviderPackage();
|
||||
method public java.lang.String getQuery();
|
||||
}
|
||||
|
||||
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.graphics.fonts.FontRequest) throws android.content.pm.PackageManager.NameNotFoundException;
|
||||
method public static void requestFonts(android.content.Context, android.graphics.fonts.FontRequest, android.os.Handler, android.os.CancellationSignal, android.provider.FontsContract.FontRequestCallback);
|
||||
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);
|
||||
}
|
||||
|
||||
public static final class FontsContract.Columns implements android.provider.BaseColumns {
|
||||
|
||||
@@ -15167,18 +15167,6 @@ package android.graphics.drawable.shapes {
|
||||
|
||||
package android.graphics.fonts {
|
||||
|
||||
public final class FontRequest implements android.os.Parcelable {
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String);
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String, java.util.List<java.util.List<byte[]>>);
|
||||
method public int describeContents();
|
||||
method public java.util.List<java.util.List<byte[]>> getCertificates();
|
||||
method public java.lang.String getProviderAuthority();
|
||||
method public java.lang.String getProviderPackage();
|
||||
method public java.lang.String getQuery();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.graphics.fonts.FontRequest> CREATOR;
|
||||
}
|
||||
|
||||
public final class FontVariationAxis {
|
||||
ctor public FontVariationAxis(java.lang.String, float) throws android.graphics.fonts.FontVariationAxis.InvalidFormatException;
|
||||
method public static android.graphics.fonts.FontVariationAxis[] fromFontVariationSettings(java.lang.String) throws android.graphics.fonts.FontVariationAxis.InvalidFormatException;
|
||||
@@ -37411,11 +37399,20 @@ package android.provider {
|
||||
method public final int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
|
||||
}
|
||||
|
||||
public final class FontRequest {
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String);
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String, java.util.List<java.util.List<byte[]>>);
|
||||
method public java.util.List<java.util.List<byte[]>> getCertificates();
|
||||
method public java.lang.String getProviderAuthority();
|
||||
method public java.lang.String getProviderPackage();
|
||||
method public java.lang.String getQuery();
|
||||
}
|
||||
|
||||
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.graphics.fonts.FontRequest) throws android.content.pm.PackageManager.NameNotFoundException;
|
||||
method public static void requestFonts(android.content.Context, android.graphics.fonts.FontRequest, android.os.Handler, android.os.CancellationSignal, android.provider.FontsContract.FontRequestCallback);
|
||||
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);
|
||||
}
|
||||
|
||||
public static final class FontsContract.Columns implements android.provider.BaseColumns {
|
||||
|
||||
@@ -14438,18 +14438,6 @@ package android.graphics.drawable.shapes {
|
||||
|
||||
package android.graphics.fonts {
|
||||
|
||||
public final class FontRequest implements android.os.Parcelable {
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String);
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String, java.util.List<java.util.List<byte[]>>);
|
||||
method public int describeContents();
|
||||
method public java.util.List<java.util.List<byte[]>> getCertificates();
|
||||
method public java.lang.String getProviderAuthority();
|
||||
method public java.lang.String getProviderPackage();
|
||||
method public java.lang.String getQuery();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.graphics.fonts.FontRequest> CREATOR;
|
||||
}
|
||||
|
||||
public final class FontVariationAxis {
|
||||
ctor public FontVariationAxis(java.lang.String, float) throws android.graphics.fonts.FontVariationAxis.InvalidFormatException;
|
||||
method public static android.graphics.fonts.FontVariationAxis[] fromFontVariationSettings(java.lang.String) throws android.graphics.fonts.FontVariationAxis.InvalidFormatException;
|
||||
@@ -34559,11 +34547,20 @@ package android.provider {
|
||||
method public final int update(android.net.Uri, android.content.ContentValues, java.lang.String, java.lang.String[]);
|
||||
}
|
||||
|
||||
public final class FontRequest {
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String);
|
||||
ctor public FontRequest(java.lang.String, java.lang.String, java.lang.String, java.util.List<java.util.List<byte[]>>);
|
||||
method public java.util.List<java.util.List<byte[]>> getCertificates();
|
||||
method public java.lang.String getProviderAuthority();
|
||||
method public java.lang.String getProviderPackage();
|
||||
method public java.lang.String getQuery();
|
||||
}
|
||||
|
||||
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.graphics.fonts.FontRequest) throws android.content.pm.PackageManager.NameNotFoundException;
|
||||
method public static void requestFonts(android.content.Context, android.graphics.fonts.FontRequest, android.os.Handler, android.os.CancellationSignal, android.provider.FontsContract.FontRequestCallback);
|
||||
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);
|
||||
}
|
||||
|
||||
public static final class FontsContract.Columns implements android.provider.BaseColumns {
|
||||
|
||||
@@ -13,11 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package android.graphics.fonts;
|
||||
package android.provider;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Base64;
|
||||
|
||||
import com.android.internal.util.Preconditions;
|
||||
@@ -29,7 +27,7 @@ import java.util.List;
|
||||
/**
|
||||
* Information about a font request that may be sent to a Font Provider.
|
||||
*/
|
||||
public final class FontRequest implements Parcelable {
|
||||
public final class FontRequest {
|
||||
private final String mProviderAuthority;
|
||||
private final String mProviderPackage;
|
||||
private final String mQuery;
|
||||
@@ -114,42 +112,6 @@ public final class FontRequest implements Parcelable {
|
||||
return mIdentifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(mProviderAuthority);
|
||||
dest.writeString(mProviderPackage);
|
||||
dest.writeString(mQuery);
|
||||
dest.writeList(mCertificates);
|
||||
}
|
||||
|
||||
private FontRequest(Parcel in) {
|
||||
mProviderAuthority = in.readString();
|
||||
mProviderPackage = in.readString();
|
||||
mQuery = in.readString();
|
||||
mCertificates = new ArrayList<>();
|
||||
in.readList(mCertificates, null);
|
||||
mIdentifier = new StringBuilder(mProviderAuthority).append("-").append(mProviderPackage)
|
||||
.append("-").append(mQuery).toString();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<FontRequest> CREATOR =
|
||||
new Parcelable.Creator<FontRequest>() {
|
||||
@Override
|
||||
public FontRequest createFromParcel(Parcel in) {
|
||||
return new FontRequest(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FontRequest[] newArray(int size) {
|
||||
return new FontRequest[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
@@ -32,7 +32,6 @@ import android.content.pm.ProviderInfo;
|
||||
import android.content.pm.Signature;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.fonts.FontRequest;
|
||||
import android.graphics.fonts.FontVariationAxis;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -29,7 +29,6 @@ import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.Signature;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.fonts.FontRequest;
|
||||
import android.os.Handler;
|
||||
import android.provider.FontsContract.Columns;
|
||||
import android.provider.FontsContract.FontFamilyResult;
|
||||
|
||||
@@ -32,7 +32,6 @@ import android.content.pm.PackageManager;
|
||||
import android.content.pm.ProviderInfo;
|
||||
import android.content.pm.Signature;
|
||||
import android.database.MatrixCursor;
|
||||
import android.graphics.fonts.FontRequest;
|
||||
import android.graphics.fonts.FontVariationAxis.InvalidFormatException;
|
||||
import android.graphics.fonts.FontVariationAxis;
|
||||
import android.provider.FontsContract.FontInfo;
|
||||
|
||||
@@ -29,7 +29,6 @@ import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.FontListParser;
|
||||
import android.graphics.fonts.FontRequest;
|
||||
import android.graphics.fonts.FontVariationAxis;
|
||||
import android.graphics.fonts.FontVariationAxis.InvalidFormatException;
|
||||
import android.net.Uri;
|
||||
@@ -37,6 +36,7 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.ResultReceiver;
|
||||
import android.provider.FontRequest;
|
||||
import android.provider.FontsContract;
|
||||
import android.text.FontConfig;
|
||||
import android.util.Base64;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/* Copyright 2017, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
package android.graphics.fonts;
|
||||
|
||||
parcelable FontSpec;
|
||||
Reference in New Issue
Block a user