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

Commit 4194e8c2 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Reorganize aconfig flags

This CL includes
- Put all config entries into the single aconfig file.
- Remove custom_locale_fallback and deprecate_fonts_xml because
  Gantry doesn't support converting READ_WRITE flag to READ_ONLY flag.
  To be a READ_ONLY flag, need to create new flag and start from
  scratch.

Bug: N/A
Test: N/A
Change-Id: Iad6229b2a620674223037ccaf41ef5fcab8f7dea
parent 9187f490
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -17572,7 +17572,7 @@ package android.graphics.fonts {
    ctor public FontFamily.Builder(@NonNull android.graphics.fonts.Font);
    method @NonNull public android.graphics.fonts.FontFamily.Builder addFont(@NonNull android.graphics.fonts.Font);
    method @NonNull public android.graphics.fonts.FontFamily build();
    method @FlaggedApi("com.android.text.flags.deprecate_fonts_xml") @Nullable public android.graphics.fonts.FontFamily buildVariableFamily();
    method @FlaggedApi("com.android.text.flags.new_fonts_fallback_xml") @Nullable public android.graphics.fonts.FontFamily buildVariableFamily();
  }
  public final class FontStyle {
@@ -17760,18 +17760,18 @@ package android.graphics.text {
    method public float getAdvance();
    method public float getAscent();
    method public float getDescent();
    method @FlaggedApi("com.android.text.flags.deprecate_fonts_xml") public boolean getFakeBold(@IntRange(from=0) int);
    method @FlaggedApi("com.android.text.flags.deprecate_fonts_xml") public boolean getFakeItalic(@IntRange(from=0) int);
    method @FlaggedApi("com.android.text.flags.new_fonts_fallback_xml") public boolean getFakeBold(@IntRange(from=0) int);
    method @FlaggedApi("com.android.text.flags.new_fonts_fallback_xml") public boolean getFakeItalic(@IntRange(from=0) int);
    method @NonNull public android.graphics.fonts.Font getFont(@IntRange(from=0) int);
    method @IntRange(from=0) public int getGlyphId(@IntRange(from=0) int);
    method public float getGlyphX(@IntRange(from=0) int);
    method public float getGlyphY(@IntRange(from=0) int);
    method @FlaggedApi("com.android.text.flags.deprecate_fonts_xml") public float getItalicOverride(@IntRange(from=0) int);
    method @FlaggedApi("com.android.text.flags.new_fonts_fallback_xml") public float getItalicOverride(@IntRange(from=0) int);
    method public float getOffsetX();
    method public float getOffsetY();
    method @FlaggedApi("com.android.text.flags.deprecate_fonts_xml") public float getWeightOverride(@IntRange(from=0) int);
    method @FlaggedApi("com.android.text.flags.new_fonts_fallback_xml") public float getWeightOverride(@IntRange(from=0) int);
    method @IntRange(from=0) public int glyphCount();
    field @FlaggedApi("com.android.text.flags.deprecate_fonts_xml") public static final float NO_OVERRIDE = 1.4E-45f;
    field @FlaggedApi("com.android.text.flags.new_fonts_fallback_xml") public static final float NO_OVERRIDE = 1.4E-45f;
  }
  public class TextRunShaper {
+0 −8
Original line number Diff line number Diff line
@@ -27,14 +27,6 @@ import com.android.text.flags.Flags;
 * @hide
 */
public class ClientFlags {

    /**
     * @see Flags#deprecateFontsXml()
     */
    public static boolean deprecateFontsXml() {
        return TextFlags.isFeatureEnabled(Flags.FLAG_DEPRECATE_FONTS_XML);
    }

    /**
     * @see Flags#noBreakNoHyphenationSpan()
     */
+0 −2
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ public final class TextFlags {
     * List of text flags to be transferred to the application process.
     */
    public static final String[] TEXT_ACONFIGS_FLAGS = {
            Flags.FLAG_DEPRECATE_FONTS_XML,
            Flags.FLAG_NO_BREAK_NO_HYPHENATION_SPAN,
            Flags.FLAG_PHRASE_STRICT_FALLBACK,
            Flags.FLAG_USE_BOUNDS_FOR_WIDTH,
@@ -67,7 +66,6 @@ public final class TextFlags {
     * The order must be the same to the TEXT_ACONFIG_FLAGS.
     */
    public static final boolean[] TEXT_ACONFIG_DEFAULT_VALUE = {
            Flags.deprecateFontsXml(),
            Flags.noBreakNoHyphenationSpan(),
            Flags.phraseStrictFallback(),
            Flags.useBoundsForWidth(),
+0 −9
Original line number Diff line number Diff line
package: "com.android.text.flags"

flag {
  name: "custom_locale_fallback"
  namespace: "text"
  description: "A feature flag that adds custom locale fallback to the vendor customization XML. This enables vendors to add their locale specific fonts, e.g. Japanese font."
  is_fixed_read_only: true
  bug: "278768958"
}
+0 −10
Original line number Diff line number Diff line
package: "com.android.text.flags"

flag {
  name: "deprecate_fonts_xml"
  namespace: "text"
  description: "Feature flag for deprecating fonts.xml. By setting true for this feature flag, the new font configuration XML, /system/etc/font_fallback.xml is used. The new XML has a new syntax and flexibility of variable font declarations, but it is not compatible with the apps that reads fonts.xml. So, fonts.xml is maintained as a subset of the font_fallback.xml"
  # Make read only, as it could be used before the Settings provider is initialized.
  is_fixed_read_only: true
  bug: "281769620"
}
Loading