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

Commit 8f441e07 authored by George Mount's avatar George Mount
Browse files

[VRR] Don't have ScreenDecorHwcOverlay vote for frame rate

Fixes: 338125263
Flag: ACONFIG android.view.flags.toolkit_set_frame_rate_read_only TRUNKFOOD

ScreenDecorHwcOverlay was voting HIGH for frame rate and it should
not vote at all. This CL makes it not vote.

Test: manual

Change-Id: Id9f7ae67c819f31d4c3fc46cb77683a1a4d8fb5d
parent f0694c53
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -121,6 +121,9 @@ public class ScreenDecorations implements
            SystemProperties.getBoolean("debug.disable_screen_decorations", false);
    private static final boolean DEBUG_SCREENSHOT_ROUNDED_CORNERS =
            SystemProperties.getBoolean("debug.screenshot_rounded_corners", false);

    private static final boolean sToolkitSetFrameRateReadOnly =
            android.view.flags.Flags.toolkitSetFrameRateReadOnly();
    private boolean mDebug = DEBUG_SCREENSHOT_ROUNDED_CORNERS;
    private int mDebugColor = Color.RED;

@@ -892,6 +895,10 @@ public class ScreenDecorations implements
        lp.width = MATCH_PARENT;
        lp.height = MATCH_PARENT;
        lp.setTitle("ScreenDecorHwcOverlay");
        if (sToolkitSetFrameRateReadOnly) {
            lp.setFrameRateBoostOnTouchEnabled(false);
            lp.setFrameRatePowerSavingsBalanced(false);
        }
        lp.gravity = Gravity.TOP | Gravity.START;
        if (!mDebug) {
            lp.setColorMode(ActivityInfo.COLOR_MODE_A8);