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

Commit a2c4477a authored by Shane's avatar Shane
Browse files

Disable toolkit dVRR feature

Disable toolkid dVRR feature

Bug: 330596920
Test: atest ViewRootImplTest / ViewTest / PhoneWindowTest / WindowTest /
HorizontalScrollViewFunctionalTest / ScrollViewFunctionalTest

Change-Id: I77b3e8320501f68c500f5010013f7a5c479d5715
parent 25530406
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -12715,7 +12715,10 @@ public final class ViewRootImpl implements ViewParent,
    }
    private boolean shouldEnableDvrr() {
        return sToolkitSetFrameRateReadOnlyFlagValue && mIsFrameRatePowerSavingsBalanced;
        // uncomment this when we are ready for enabling dVRR
        // return sToolkitSetFrameRateReadOnlyFlagValue && mIsFrameRatePowerSavingsBalanced;
        return false;
    }
    private void checkIdleness() {
+19 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -462,6 +463,7 @@ public class ViewRootImplTest {
     */
    @UiThreadTest
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_getDefaultValues() {
        ViewRootImpl viewRootImpl = new ViewRootImpl(sContext,
@@ -478,6 +480,7 @@ public class ViewRootImplTest {
     * Also, mIsFrameRateBoosting should be true when the visibility becomes visible
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled({FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY,
            FLAG_TOOLKIT_FRAME_RATE_BY_SIZE_READ_ONLY})
    public void votePreferredFrameRate_voteFrameRateCategory_visibility_bySize() {
@@ -511,6 +514,7 @@ public class ViewRootImplTest {
     * <7%: FRAME_RATE_CATEGORY_LOW
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled({FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY,
            FLAG_TOOLKIT_FRAME_RATE_BY_SIZE_READ_ONLY})
    public void votePreferredFrameRate_voteFrameRateCategory_smallSize_bySize() {
@@ -539,6 +543,7 @@ public class ViewRootImplTest {
     * >=7% : FRAME_RATE_CATEGORY_NORMAL
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled({FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY,
            FLAG_TOOLKIT_FRAME_RATE_BY_SIZE_READ_ONLY})
    public void votePreferredFrameRate_voteFrameRateCategory_normalSize_bySize() {
@@ -571,6 +576,7 @@ public class ViewRootImplTest {
     * Also, mIsFrameRateBoosting should be true when the visibility becomes visible
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_voteFrameRateCategory_visibility_defaultHigh() {
        View view = new View(sContext);
@@ -603,6 +609,7 @@ public class ViewRootImplTest {
     * <7%: FRAME_RATE_CATEGORY_NORMAL
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_voteFrameRateCategory_smallSize_defaultHigh() {
        View view = new View(sContext);
@@ -630,6 +637,7 @@ public class ViewRootImplTest {
     * >=7% : FRAME_RATE_CATEGORY_HIGH
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_voteFrameRateCategory_normalSize_defaultHigh() {
        View view = new View(sContext);
@@ -659,6 +667,7 @@ public class ViewRootImplTest {
     * It should take the max value among all of the voted categories per frame.
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_voteFrameRateCategory_aggregate() {
        View view = new View(sContext);
@@ -704,6 +713,7 @@ public class ViewRootImplTest {
     * prioritize 60Hz..
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_voteFrameRate_aggregate() {
        View view = new View(sContext);
@@ -762,6 +772,7 @@ public class ViewRootImplTest {
     * submit your preferred choice to the ViewRootImpl.
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_voteFrameRate_category() {
        View view = new View(sContext);
@@ -801,6 +812,7 @@ public class ViewRootImplTest {
     * Also, we shouldn't call setFrameRate.
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled({FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY, FLAG_VIEW_VELOCITY_API})
    public void votePreferredFrameRate_voteFrameRateCategory_velocityToHigh() {
        View view = new View(sContext);
@@ -832,6 +844,7 @@ public class ViewRootImplTest {
     * We should boost the frame rate if the value of mInsetsAnimationRunning is true.
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_insetsAnimation() {
        View view = new View(sContext);
@@ -868,6 +881,7 @@ public class ViewRootImplTest {
     * Test FrameRateBoostOnTouchEnabled API
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_frameRateBoostOnTouch() {
        View view = new View(sContext);
@@ -900,6 +914,7 @@ public class ViewRootImplTest {
     * mPreferredFrameRate should be set to 0.
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_voteFrameRateTimeOut() throws InterruptedException {
        final long delay = 200L;
@@ -937,6 +952,7 @@ public class ViewRootImplTest {
     * A View should either vote a frame rate or a frame rate category instead of both.
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_voteFrameRateOnly() {
        View view = new View(sContext);
@@ -979,6 +995,7 @@ public class ViewRootImplTest {
     * - otherwise, use the previous category value.
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_infrequentLayer_defaultHigh() throws InterruptedException {
        final long delay = 200L;
@@ -1039,6 +1056,7 @@ public class ViewRootImplTest {
     */
    @UiThreadTest
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_isFrameRatePowerSavingsBalanced() {
        ViewRootImpl viewRootImpl = new ViewRootImpl(sContext,
@@ -1056,6 +1074,7 @@ public class ViewRootImplTest {
     * 2. If FT2-FT1 > 15ms && FT3-FT2 > 15ms -> vote for NORMAL category
     */
    @Test
    @Ignore("Can be enabled only after b/330596920 is ready")
    @RequiresFlagsEnabled(FLAG_TOOLKIT_SET_FRAME_RATE_READ_ONLY)
    public void votePreferredFrameRate_applyTextureViewHeuristic() throws InterruptedException {
        final long delay = 30L;