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

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

Merge changes from topic "remove_use_bounds_for_width" into main

* changes:
  Remove vendor_custom_locale_fallback
  Remove fix_double_underline flag
  Remove use_bounds_for_width flag
parents f1c31241 f56e17d7
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -41,13 +41,6 @@ public class ClientFlags {
        return TextFlags.isFeatureEnabled(Flags.FLAG_PHRASE_STRICT_FALLBACK);
    }

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

    /**
     * @see Flags#fixLineHeightForLocale()
     */
+0 −2
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ public final class TextFlags {
    public static final String[] TEXT_ACONFIGS_FLAGS = {
            Flags.FLAG_NO_BREAK_NO_HYPHENATION_SPAN,
            Flags.FLAG_PHRASE_STRICT_FALLBACK,
            Flags.FLAG_USE_BOUNDS_FOR_WIDTH,
            Flags.FLAG_FIX_LINE_HEIGHT_FOR_LOCALE,
            Flags.FLAG_ICU_BIDI_MIGRATION,
            Flags.FLAG_FIX_MISALIGNED_CONTEXT_MENU,
@@ -71,7 +70,6 @@ public final class TextFlags {
    public static final boolean[] TEXT_ACONFIG_DEFAULT_VALUE = {
            Flags.noBreakNoHyphenationSpan(),
            Flags.phraseStrictFallback(),
            Flags.useBoundsForWidth(),
            Flags.fixLineHeightForLocale(),
            Flags.icuBidiMigration(),
            Flags.fixMisalignedContextMenu(),
+0 −15
Original line number Diff line number Diff line
package: "com.android.text.flags"
container: "system"

flag {
  name: "vendor_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"
}

flag {
  name: "new_fonts_fallback_xml"
  is_exported: true
@@ -19,13 +11,6 @@ flag {
  bug: "281769620"
}

flag {
  name: "fix_double_underline"
  namespace: "text"
  description: "Feature flag for fixing double underline because of the multiple font used in the single line."
  bug: "297336724"
}

flag {
  name: "fix_line_height_for_locale"
  is_exported: true
+1 −5
Original line number Diff line number Diff line
@@ -1659,11 +1659,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        }
        if (!hasUseBoundForWidthValue) {
            if (CompatChanges.isChangeEnabled(USE_BOUNDS_FOR_WIDTH)) {
                mUseBoundsForWidth = Flags.useBoundsForWidth();
            } else {
                mUseBoundsForWidth = false;
            }
            mUseBoundsForWidth = CompatChanges.isChangeEnabled(USE_BOUNDS_FOR_WIDTH);
        }
        // TODO(b/179693024): Use a ChangeId instead.
+0 −8
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package android.graphics;

import static com.android.text.flags.Flags.FLAG_VENDOR_CUSTOM_LOCALE_FALLBACK;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -32,7 +30,6 @@ import android.graphics.fonts.FontFamily;
import android.graphics.fonts.SystemFonts;
import android.graphics.text.PositionedGlyphs;
import android.graphics.text.TextRunShaper;
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
import android.text.FontConfig;
@@ -931,7 +928,6 @@ public class TypefaceSystemFallbackTest {
        return String.format(xml, op, lang, font);
    }

    @RequiresFlagsEnabled(FLAG_VENDOR_CUSTOM_LOCALE_FALLBACK)
    @Test
    public void testBuildSystemFallback__Customization_locale_prepend() {
        final ArrayMap<String, Typeface> fontMap = new ArrayMap<>();
@@ -947,7 +943,6 @@ public class TypefaceSystemFallbackTest {
        assertB3emFontIsUsed(typeface);
    }

    @RequiresFlagsEnabled(FLAG_VENDOR_CUSTOM_LOCALE_FALLBACK)
    @Test
    public void testBuildSystemFallback__Customization_locale_replace() {
        final ArrayMap<String, Typeface> fontMap = new ArrayMap<>();
@@ -963,7 +958,6 @@ public class TypefaceSystemFallbackTest {
        assertB3emFontIsUsed(typeface);
    }

    @RequiresFlagsEnabled(FLAG_VENDOR_CUSTOM_LOCALE_FALLBACK)
    @Test
    public void testBuildSystemFallback__Customization_locale_append() {
        final ArrayMap<String, Typeface> fontMap = new ArrayMap<>();
@@ -979,7 +973,6 @@ public class TypefaceSystemFallbackTest {
        assertA3emFontIsUsed(typeface);
    }

    @RequiresFlagsEnabled(FLAG_VENDOR_CUSTOM_LOCALE_FALLBACK)
    @Test
    public void testBuildSystemFallback__Customization_locale_ScriptMismatch() {
        final ArrayMap<String, Typeface> fontMap = new ArrayMap<>();
@@ -995,7 +988,6 @@ public class TypefaceSystemFallbackTest {
        assertA3emFontIsUsed(typeface);
    }

    @RequiresFlagsEnabled(FLAG_VENDOR_CUSTOM_LOCALE_FALLBACK)
    @Test
    public void testBuildSystemFallback__Customization_locale_SubscriptMatch() {
        final ArrayMap<String, Typeface> fontMap = new ArrayMap<>();
Loading