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

Commit f56e17d7 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Remove vendor_custom_locale_fallback

Bug: 278768958
Bug: 364533012
Flag: EXEMPT removing com.android.text.flags.vendor_custom_locale_fallback
Test: N/A
Change-Id: I71fd5382cec9876327c442caaaa2963a6fe81e56
parent b60dc9a3
Loading
Loading
Loading
Loading
+0 −8
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
+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<>();
+2 −4
Original line number Diff line number Diff line
@@ -182,10 +182,8 @@ public class FontCustomizationParser {

            // For ignoring the customization, consume the new-locale-family element but don't
            // register any customizations.
            if (com.android.text.flags.Flags.vendorCustomLocaleFallback()) {
            outCustomization.add(new FontConfig.Customization.LocaleFallback(
                    Locale.forLanguageTag(lang), intOp, family));
            }
        } else {
            throw new IllegalArgumentException("Unknown customizationType=" + customizationType);
        }