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

Commit 5b4284c1 authored by Justin Ghan's avatar Justin Ghan
Browse files

Rename flag

The flag was previously submitted as a non bugfix flag, so it cannot be
changed to a bugfix flag.

Bug: 404936438
Test: ViewFrameRateTest
Flag: android.view.flags.toolkit_velocity_map_sysprop
Change-Id: I4e180fc614905f46d5f59f2110129b0f10454c63
parent 092bb913
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ 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.toolkitVelocitySysprop;
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;
@@ -2477,18 +2477,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    private static boolean sToolkitViewGroupFrameRateApiFlagValue =
            toolkitViewgroupSetRequestedFrameRateApi();
    // The read-write flag toolkitVelocitySysprop() cannot be initialized at Zygote. To prevent
    // The read-write flag toolkitVelocityMapSysprop() cannot be initialized at Zygote. To prevent
    // this, initialize inside this class with special name NoPreloadHolder which prevents
    // initialization at Zygote.
    /** @hide */
    @VisibleForTesting
    static final class NoPreloadHolder {
        private static boolean sToolkitVelocitySyspropFlagValue = toolkitVelocitySysprop();
        private static boolean sToolkitVelocityMapSyspropFlagValue = toolkitVelocityMapSysprop();
        private static String sFrameRateSysProp =
                ViewProperties.vrr_velocity_threshold().orElse("");
        static {
            if (sToolkitVelocitySyspropFlagValue && !sFrameRateSysProp.isEmpty()) {
            if (sToolkitVelocityMapSyspropFlagValue && !sFrameRateSysProp.isEmpty()) {
                sFrameRateMappings = parseFrameRateMapping(sFrameRateSysProp);
            }
        }
@@ -34584,7 +34584,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    private float convertVelocityToFrameRate(float velocityPps) {
        if (NoPreloadHolder.sToolkitVelocitySyspropFlagValue && sFrameRateMappings != null
        if (NoPreloadHolder.sToolkitVelocityMapSyspropFlagValue && sFrameRateMappings != null
                && sFrameRateMappings.length > 0) {
            return getFrameRateByVelocity(sFrameRateMappings, (int) velocityPps);
        }
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ flag {
}

flag {
    name: "toolkit_velocity_sysprop"
    name: "toolkit_velocity_map_sysprop"
    namespace: "toolkit"
    description: "Feature flag to map velocity to frame rate using sysprop"
    bug: "404936438"