Loading services/core/java/com/android/server/display/feature/DisplayManagerFlags.java +0 −13 Original line number Diff line number Diff line Loading @@ -179,10 +179,6 @@ public class DisplayManagerFlags { Flags.FLAG_NEW_HDR_BRIGHTNESS_MODIFIER, Flags::newHdrBrightnessModifier); private final FlagState mIdleScreenConfigInSubscribingLightSensor = new FlagState( Flags.FLAG_IDLE_SCREEN_CONFIG_IN_SUBSCRIBING_LIGHT_SENSOR, Flags::idleScreenConfigInSubscribingLightSensor); private final FlagState mVirtualDisplayLimit = new FlagState( Flags.FLAG_VIRTUAL_DISPLAY_LIMIT, Loading Loading @@ -483,14 +479,6 @@ public class DisplayManagerFlags { com.android.internal.R.bool.config_allowNormalBrightnessForDozePolicy); } /** * @return {@code true} if idle timer refresh rate config is accounted for while subscribing to * the light sensor */ public boolean isIdleScreenConfigInSubscribingLightSensorEnabled() { return mIdleScreenConfigInSubscribingLightSensor.isEnabled(); } /** * @return {@code true} if mirroring won't be enabled until boot completes and the user enables * the display. Loading Loading @@ -666,7 +654,6 @@ public class DisplayManagerFlags { pw.println(" " + mNewHdrBrightnessModifier); pw.println(" " + mVirtualDisplayLimit); pw.println(" " + mNormalBrightnessForDozeParameter); pw.println(" " + mIdleScreenConfigInSubscribingLightSensor); pw.println(" " + mEnableWaitingConfirmationBeforeMirroring); pw.println(" " + mEnableBatteryStatsForAllDisplays); pw.println(" " + mEnableApplyDisplayChangedDuringDisplayAdded); Loading services/core/java/com/android/server/display/feature/display_flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -311,17 +311,6 @@ flag { is_fixed_read_only: true } flag { name: "idle_screen_config_in_subscribing_light_sensor" namespace: "display_manager" description: "Account for Idle screen refresh rate configs while subscribing to light sensor" bug: "358019330" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enable_waiting_confirmation_before_mirroring" namespace: "display_manager" Loading services/core/java/com/android/server/display/mode/DisplayModeDirector.java +2 −4 Original line number Diff line number Diff line Loading @@ -1866,8 +1866,7 @@ public class DisplayModeDirector { private void loadIdleScreenRefreshRateConfigs(DisplayDeviceConfig displayDeviceConfig) { synchronized (mLock) { if (!mDisplayManagerFlags.isIdleScreenConfigInSubscribingLightSensorEnabled() || displayDeviceConfig == null || displayDeviceConfig if (displayDeviceConfig == null || displayDeviceConfig .getIdleScreenRefreshRateTimeoutLuxThresholdPoint().isEmpty()) { // Setting this to null will let surface flinger know that the idle timer is not // configured in the display configs Loading Loading @@ -2589,8 +2588,7 @@ public class DisplayModeDirector { } private boolean isIdleScreenRefreshRateConfigDefined() { return mDisplayManagerFlags.isIdleScreenConfigInSubscribingLightSensorEnabled() && mIdleScreenRefreshRateTimeoutLuxThresholdPoints != null return mIdleScreenRefreshRateTimeoutLuxThresholdPoints != null && !mIdleScreenRefreshRateTimeoutLuxThresholdPoints.isEmpty(); } Loading services/tests/displayservicetests/src/com/android/server/display/mode/DisplayModeDirectorTest.java +1 −12 Original line number Diff line number Diff line Loading @@ -1607,16 +1607,7 @@ public class DisplayModeDirectorTest { getIdleScreenRefreshRateTimeoutLuxThresholdPoint(100, 800))); director.defaultDisplayDeviceUpdated(ddcMock); // set the updated ddc // idleScreenRefreshRate config is still null because the flag to enable subscription to // light sensor is not enabled sensorListener.onSensorChanged(TestUtils.createSensorEvent(lightSensor, 4)); waitForIdleSync(); assertNull(director.getBrightnessObserver().getIdleScreenRefreshRateConfig()); // Flag to subscribe to light sensor is enabled, and the sensor subscription is attempted // again to load the idle screen refresh rate config when(mDisplayManagerFlags.isIdleScreenConfigInSubscribingLightSensorEnabled()) .thenReturn(true); // The sensor subscription is attempted again to load the idle screen refresh rate config director.defaultDisplayDeviceUpdated(ddcMock); // set the updated ddc // Sensor reads 5 lux Loading Loading @@ -3346,8 +3337,6 @@ public class DisplayModeDirectorTest { @Test public void testNotifyDefaultDisplayDeviceUpdated() { when(mDisplayManagerFlags.isIdleScreenConfigInSubscribingLightSensorEnabled()) .thenReturn(true); when(mResources.getInteger(com.android.internal.R.integer.config_defaultPeakRefreshRate)) .thenReturn(75); when(mResources.getInteger(R.integer.config_defaultRefreshRate)) Loading Loading
services/core/java/com/android/server/display/feature/DisplayManagerFlags.java +0 −13 Original line number Diff line number Diff line Loading @@ -179,10 +179,6 @@ public class DisplayManagerFlags { Flags.FLAG_NEW_HDR_BRIGHTNESS_MODIFIER, Flags::newHdrBrightnessModifier); private final FlagState mIdleScreenConfigInSubscribingLightSensor = new FlagState( Flags.FLAG_IDLE_SCREEN_CONFIG_IN_SUBSCRIBING_LIGHT_SENSOR, Flags::idleScreenConfigInSubscribingLightSensor); private final FlagState mVirtualDisplayLimit = new FlagState( Flags.FLAG_VIRTUAL_DISPLAY_LIMIT, Loading Loading @@ -483,14 +479,6 @@ public class DisplayManagerFlags { com.android.internal.R.bool.config_allowNormalBrightnessForDozePolicy); } /** * @return {@code true} if idle timer refresh rate config is accounted for while subscribing to * the light sensor */ public boolean isIdleScreenConfigInSubscribingLightSensorEnabled() { return mIdleScreenConfigInSubscribingLightSensor.isEnabled(); } /** * @return {@code true} if mirroring won't be enabled until boot completes and the user enables * the display. Loading Loading @@ -666,7 +654,6 @@ public class DisplayManagerFlags { pw.println(" " + mNewHdrBrightnessModifier); pw.println(" " + mVirtualDisplayLimit); pw.println(" " + mNormalBrightnessForDozeParameter); pw.println(" " + mIdleScreenConfigInSubscribingLightSensor); pw.println(" " + mEnableWaitingConfirmationBeforeMirroring); pw.println(" " + mEnableBatteryStatsForAllDisplays); pw.println(" " + mEnableApplyDisplayChangedDuringDisplayAdded); Loading
services/core/java/com/android/server/display/feature/display_flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -311,17 +311,6 @@ flag { is_fixed_read_only: true } flag { name: "idle_screen_config_in_subscribing_light_sensor" namespace: "display_manager" description: "Account for Idle screen refresh rate configs while subscribing to light sensor" bug: "358019330" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "enable_waiting_confirmation_before_mirroring" namespace: "display_manager" Loading
services/core/java/com/android/server/display/mode/DisplayModeDirector.java +2 −4 Original line number Diff line number Diff line Loading @@ -1866,8 +1866,7 @@ public class DisplayModeDirector { private void loadIdleScreenRefreshRateConfigs(DisplayDeviceConfig displayDeviceConfig) { synchronized (mLock) { if (!mDisplayManagerFlags.isIdleScreenConfigInSubscribingLightSensorEnabled() || displayDeviceConfig == null || displayDeviceConfig if (displayDeviceConfig == null || displayDeviceConfig .getIdleScreenRefreshRateTimeoutLuxThresholdPoint().isEmpty()) { // Setting this to null will let surface flinger know that the idle timer is not // configured in the display configs Loading Loading @@ -2589,8 +2588,7 @@ public class DisplayModeDirector { } private boolean isIdleScreenRefreshRateConfigDefined() { return mDisplayManagerFlags.isIdleScreenConfigInSubscribingLightSensorEnabled() && mIdleScreenRefreshRateTimeoutLuxThresholdPoints != null return mIdleScreenRefreshRateTimeoutLuxThresholdPoints != null && !mIdleScreenRefreshRateTimeoutLuxThresholdPoints.isEmpty(); } Loading
services/tests/displayservicetests/src/com/android/server/display/mode/DisplayModeDirectorTest.java +1 −12 Original line number Diff line number Diff line Loading @@ -1607,16 +1607,7 @@ public class DisplayModeDirectorTest { getIdleScreenRefreshRateTimeoutLuxThresholdPoint(100, 800))); director.defaultDisplayDeviceUpdated(ddcMock); // set the updated ddc // idleScreenRefreshRate config is still null because the flag to enable subscription to // light sensor is not enabled sensorListener.onSensorChanged(TestUtils.createSensorEvent(lightSensor, 4)); waitForIdleSync(); assertNull(director.getBrightnessObserver().getIdleScreenRefreshRateConfig()); // Flag to subscribe to light sensor is enabled, and the sensor subscription is attempted // again to load the idle screen refresh rate config when(mDisplayManagerFlags.isIdleScreenConfigInSubscribingLightSensorEnabled()) .thenReturn(true); // The sensor subscription is attempted again to load the idle screen refresh rate config director.defaultDisplayDeviceUpdated(ddcMock); // set the updated ddc // Sensor reads 5 lux Loading Loading @@ -3346,8 +3337,6 @@ public class DisplayModeDirectorTest { @Test public void testNotifyDefaultDisplayDeviceUpdated() { when(mDisplayManagerFlags.isIdleScreenConfigInSubscribingLightSensorEnabled()) .thenReturn(true); when(mResources.getInteger(com.android.internal.R.integer.config_defaultPeakRefreshRate)) .thenReturn(75); when(mResources.getInteger(R.integer.config_defaultRefreshRate)) Loading