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

Commit 8ebaf715 authored by shane's avatar shane
Browse files

[ARR] Remove android.view.flags.toolkit_velocity_map_sysprop flag

Remove android.view.flags.toolkit_velocity_map_sysprop flag and
references from the codebase since the gated feature is already on
production.

Fixes: 433341703
Test: ateat ViewFrameRateTest
Flag: EXEMPT remove flags in production
Change-Id: I125d21455f4e3a5548fdc3ccc56217dc2f689b8e
parent 3d61c5d0
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ import static android.view.flags.Flags.sensitiveContentAppProtection;
import static android.view.flags.Flags.toolkitFrameRateBySizeReadOnly;
import static android.view.flags.Flags.toolkitMetricsForFrameRateDecision;
import static android.view.flags.Flags.toolkitSetFrameRateReadOnly;
import static android.view.flags.Flags.toolkitVelocityMapSysprop;
import static android.view.flags.Flags.toolkitViewgroupSetRequestedFrameRateApi;
import static android.view.flags.Flags.viewVelocityApi;
import static android.view.inputmethod.Flags.FLAG_HOME_SCREEN_HANDWRITING_DELEGATOR;
@@ -2482,13 +2481,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    // initialization at Zygote.
    /** @hide */
    @VisibleForTesting
    static final class NoPreloadHolder {
        private static boolean sToolkitVelocityMapSyspropFlagValue = toolkitVelocityMapSysprop();
    public static final class NoPreloadHolder {
        private static String sFrameRateSysProp =
                ViewProperties.vrr_velocity_threshold().orElse("");
        static {
            if (sToolkitVelocityMapSyspropFlagValue && !sFrameRateSysProp.isEmpty()) {
            if (!sFrameRateSysProp.isEmpty()) {
                sFrameRateMappings = parseFrameRateMapping(sFrameRateSysProp);
            }
        }
@@ -2499,7 +2497,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
         * @hide
         */
        @VisibleForTesting
        static int[][] parseFrameRateMapping(String mappings) {
        public static int[][] parseFrameRateMapping(String mappings) {
            if (mappings.isEmpty()) {
                return null;
            }
@@ -34685,8 +34683,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    private float convertVelocityToFrameRate(float velocityPps) {
        if (NoPreloadHolder.sToolkitVelocityMapSyspropFlagValue && sFrameRateMappings != null
                && sFrameRateMappings.length > 0) {
        if (sFrameRateMappings != null && sFrameRateMappings.length > 0) {
            return getFrameRateByVelocity(sFrameRateMappings, (int) velocityPps);
        }
        // Internal testing has shown that this gives a premium experience:
+0 −10
Original line number Diff line number Diff line
@@ -95,13 +95,3 @@ flag {
    description: "Feature flag to ennable ARR debug message"
    bug: "394614443"
}

flag {
    name: "toolkit_velocity_map_sysprop"
    namespace: "toolkit"
    description: "Feature flag to map velocity to frame rate using sysprop"
    bug: "404936438"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}