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

Commit f8e4bfa4 authored by Shane's avatar Shane
Browse files

Add new flag toolkit_frame_rate_function_eanbling_read_only

Add new flag toolkit_frame_rate_function_eanbling_read_only to be able
to turn on / off the dVRR feature - to call setFrameRate /
setFrameRateCategory

Test: atest ViewRootImplTest
Change-Id: I801a6dd711b5ca4716d0de40720d5d60e3357db1
parent 024a0a8b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ import static android.view.accessibility.Flags.reduceWindowContentChangedEventTh
import static android.view.flags.Flags.toolkitFrameRateTypingReadOnly;
import static android.view.flags.Flags.toolkitMetricsForFrameRateDecision;
import static android.view.flags.Flags.toolkitSetFrameRateReadOnly;
import static android.view.flags.Flags.toolkitFrameRateFunctionEnablingReadOnly;
import static android.view.inputmethod.InputMethodEditorTraceProto.InputMethodClientsTraceProto.ClientSideProto.IME_FOCUS_CONTROLLER;
import static android.view.inputmethod.InputMethodEditorTraceProto.InputMethodClientsTraceProto.ClientSideProto.INSETS_CONTROLLER;
@@ -1148,6 +1149,7 @@ public final class ViewRootImpl implements ViewParent,
    private String mLargestViewTraceName;
    private static boolean sToolkitSetFrameRateReadOnlyFlagValue;
    private static boolean sToolkitFrameRateFunctionEnablingReadOnlyFlagValue;
    private static boolean sToolkitMetricsForFrameRateDecisionFlagValue;
    private static boolean sToolkitFrameRateTypingReadOnlyFlagValue;
@@ -1155,6 +1157,8 @@ public final class ViewRootImpl implements ViewParent,
        sToolkitSetFrameRateReadOnlyFlagValue = toolkitSetFrameRateReadOnly();
        sToolkitMetricsForFrameRateDecisionFlagValue = toolkitMetricsForFrameRateDecision();
        sToolkitFrameRateTypingReadOnlyFlagValue = toolkitFrameRateTypingReadOnly();
        sToolkitFrameRateFunctionEnablingReadOnlyFlagValue =
                toolkitFrameRateFunctionEnablingReadOnly();
    }
    // The latest input event from the gesture that was used to resolve the pointer icon.
@@ -12788,7 +12792,9 @@ public final class ViewRootImpl implements ViewParent,
    private boolean shouldEnableDvrr() {
        // uncomment this when we are ready for enabling dVRR
        // return sToolkitSetFrameRateReadOnlyFlagValue && isFrameRatePowerSavingsBalanced();
        if (sToolkitFrameRateFunctionEnablingReadOnlyFlagValue) {
            return sToolkitSetFrameRateReadOnlyFlagValue && isFrameRatePowerSavingsBalanced();
        }
        return false;
    }
+8 −0
Original line number Diff line number Diff line
@@ -87,3 +87,11 @@ flag {
    bug: "239979904"
    is_fixed_read_only: true
}

flag {
    name: "toolkit_frame_rate_function_enabling_read_only"
    namespace: "toolkit"
    description: "Feature flag to enable the functionality of the dVRR feature"
    bug: "239979904"
    is_fixed_read_only: true
}
 No newline at end of file