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

Commit 81de0e78 authored by Kristina Trajkovski's avatar Kristina Trajkovski
Browse files

Remove the Display Manager flag enable_vsync_low_power_vote flag

Test: Manual test on device
Bug: 409611319
Flag: EXEMPT FLAG_REMOVAL

Change-Id: Iabcdef1234567890abcdef1234567890abcdef12
parent 110501cc
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -81,10 +81,6 @@ public class DisplayManagerFlags {
            Flags.FLAG_RESOLUTION_BACKUP_RESTORE,
            Flags::resolutionBackupRestore);

    private final FlagState mVsyncLowPowerVote = new FlagState(
            Flags.FLAG_ENABLE_VSYNC_LOW_POWER_VOTE,
            Flags::enableVsyncLowPowerVote);

    private final FlagState mBrightnessWearBedtimeModeClamperFlagState = new FlagState(
            Flags.FLAG_BRIGHTNESS_WEAR_BEDTIME_MODE_CLAMPER,
            Flags::brightnessWearBedtimeModeClamper);
@@ -299,10 +295,6 @@ public class DisplayManagerFlags {
        return mResolutionBackupRestore.isEnabled();
    }

    public boolean isVsyncLowPowerVoteEnabled() {
        return mVsyncLowPowerVote.isEnabled();
    }

    public boolean isBrightnessWearBedtimeModeClamperEnabled() {
        return mBrightnessWearBedtimeModeClamperFlagState.isEnabled();
    }
+0 −8
Original line number Diff line number Diff line
@@ -77,14 +77,6 @@ flag {
    is_fixed_read_only: true
}

flag {
    name: "enable_vsync_low_power_vote"
    namespace: "display_manager"
    description: "Feature flag for vsync low power vote"
    bug: "314920284"
    is_fixed_read_only: true
}

flag {
    name: "brightness_wear_bedtime_mode_clamper"
    namespace: "display_manager"
+0 −5
Original line number Diff line number Diff line
@@ -959,7 +959,6 @@ public class DisplayModeDirector {
        private final Uri mMatchContentFrameRateSetting =
                Settings.Secure.getUriFor(Settings.Secure.MATCH_CONTENT_FRAME_RATE);

        private final boolean mVsyncLowPowerVoteEnabled;
        private final boolean mPeakRefreshRatePhysicalLimitEnabled;

        private final Context mContext;
@@ -996,7 +995,6 @@ public class DisplayModeDirector {
            super(handler);
            mContext = context;
            mHandler = handler;
            mVsyncLowPowerVoteEnabled = flags.isVsyncLowPowerVoteEnabled();
            mPeakRefreshRatePhysicalLimitEnabled = flags.isPeakRefreshRatePhysicalLimitEnabled();
            // We don't want to load from the DeviceConfig while constructing since this leads to
            // a spike in the latency of DisplayManagerService startup. This happens because
@@ -1125,9 +1123,6 @@ public class DisplayModeDirector {

        @GuardedBy("mLock")
        private void updateLowPowerModeAllowedModesLocked() {
            if (!mVsyncLowPowerVoteEnabled) {
                return;
            }
            if (mIsLowPower) {
                for (int i = 0; i < mDisplayDeviceConfigByDisplay.size(); i++) {
                    DisplayDeviceConfig config = mDisplayDeviceConfigByDisplay.valueAt(i);
+4 −10
Original line number Diff line number Diff line
@@ -104,7 +104,6 @@ class SettingsObserverTest {

    @Test
    fun testLowPowerMode(@TestParameter testCase: LowPowerTestCase) {
        whenever(mockFlags.isVsyncLowPowerVoteEnabled).thenReturn(testCase.vsyncLowPowerVoteEnabled)
        whenever(spyContext.contentResolver)
                .thenReturn(settingsProviderRule.mockContentResolver(null))
        val lowPowerModeSetting = if (testCase.lowPowerModeEnabled) 1 else 0
@@ -131,22 +130,17 @@ class SettingsObserverTest {

    enum class LowPowerTestCase(
        val refreshRateData: RefreshRateData,
        val vsyncLowPowerVoteEnabled: Boolean,
        val lowPowerModeEnabled: Boolean,
        internal val globalVote: Vote?,
        internal val displayVote: Vote?
    ) {
        ALL_ENABLED(LOW_POWER_REFRESH_RATE_DATA, true, true,
        ALL_ENABLED(LOW_POWER_REFRESH_RATE_DATA, true,
            LOW_POWER_GLOBAL_VOTE, EXPECTED_SUPPORTED_MODES_VOTE),
        LOW_POWER_OFF(LOW_POWER_REFRESH_RATE_DATA, true, false,
        LOW_POWER_OFF(LOW_POWER_REFRESH_RATE_DATA, false,
            null, null),
        EMPTY_REFRESH_LOW_POWER_ON(LOW_POWER_EMPTY_REFRESH_RATE_DATA, true, true,
        EMPTY_REFRESH_LOW_POWER_ON(LOW_POWER_EMPTY_REFRESH_RATE_DATA, true,
            LOW_POWER_GLOBAL_VOTE, null),
        EMPTY_REFRESH__LOW_POWER_OFF(LOW_POWER_EMPTY_REFRESH_RATE_DATA, true, false,
            null, null),
        VSYNC_VOTE_DISABLED_SUPPORTED_LOW_POWER_ON(LOW_POWER_REFRESH_RATE_DATA, false, true,
            LOW_POWER_GLOBAL_VOTE, null),
        VSYNC_VOTE_DISABLED_LOW_POWER_OFF(LOW_POWER_REFRESH_RATE_DATA, false, false,
        EMPTY_REFRESH__LOW_POWER_OFF(LOW_POWER_EMPTY_REFRESH_RATE_DATA, false,
            null, null),
    }