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

Commit b1faba74 authored by Massimo Carli's avatar Massimo Carli Committed by Android (Google) Code Review
Browse files

Merge "Removing configurable_font_scale_default flag" into main

parents e0004647 ad9d4616
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -4843,9 +4843,8 @@ public final class Settings {
        }
        private static float getDefaultFontScale(ContentResolver cr, int userHandle) {
            return com.android.window.flags.Flags.configurableFontScaleDefault()
                    ? Settings.System.getFloatForUser(cr, DEFAULT_DEVICE_FONT_SCALE,
                    DEFAULT_FONT_SCALE, userHandle) : DEFAULT_FONT_SCALE;
            return Settings.System.getFloatForUser(cr, DEFAULT_DEVICE_FONT_SCALE,
                    DEFAULT_FONT_SCALE, userHandle);
        }
        /**
+0 −8
Original line number Diff line number Diff line
@@ -64,14 +64,6 @@ flag {
  bug: "318840081"
}

flag {
  name: "configurable_font_scale_default"
  namespace: "large_screen_experiences_app_compat"
  description: "Whether the font_scale is read from a device dependent configuration file"
  bug: "319808237"
  is_fixed_read_only: true
}

flag {
  name: "camera_compat_for_freeform"
  namespace: "large_screen_experiences_app_compat"
+15 −19
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
import com.android.internal.widget.LockPatternUtils;
import com.android.settingslib.display.DisplayDensityConfiguration;
import com.android.window.flags.Flags;

import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
@@ -1134,7 +1133,6 @@ public class SettingsBackupAgent extends BackupAgentHelper {
    @VisibleForTesting
    static String findClosestAllowedFontScale(@NonNull String requestedFontScale,
            @NonNull String[] availableFontScales) {
        if (Flags.configurableFontScaleDefault()) {
        final float requestedValue = Float.parseFloat(requestedFontScale);
        // Whatever is the requested value, we search the closest allowed value which is
        // equals or larger. Note that if the requested value is the previous default,
@@ -1153,8 +1151,6 @@ public class SettingsBackupAgent extends BackupAgentHelper {
        return fontScaleFound ? String.valueOf(candidate) : String.valueOf(
                availableFontScales[availableFontScales.length - 1]);
    }
        return requestedFontScale;
    }

    @VisibleForTesting
    SettingsBackupAllowlist getBackupAllowlist(Uri contentUri) {
+0 −3
Original line number Diff line number Diff line
@@ -65,8 +65,6 @@ import android.test.mock.MockContentResolver;

import androidx.test.runner.AndroidJUnit4;

import com.android.window.flags.Flags;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -301,7 +299,6 @@ public class SettingsBackupAgentTest extends BaseSettingsProviderTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_CONFIGURABLE_FONT_SCALE_DEFAULT)
    public void testFindClosestAllowedFontScale() {
        final String[] availableFontScales = new String[]{"0.5", "0.9", "1.0", "1.1", "1.5"};
        final Function<String, String> testedMethod =