Merge "Restoring SDR brightness immediately when entering dim state if the device is in HDR brightness scale mode." into udc-dev

This commit is contained in:
Piotr Wilczyński
2023-04-17 13:37:32 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 6 deletions

View File

@@ -1816,10 +1816,11 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// TODO(b/216365040): The decision to prevent HBM for HDR in low power mode should be
// done in HighBrightnessModeController.
if (mHbmController.getHighBrightnessMode() == BrightnessInfo.HIGH_BRIGHTNESS_MODE_HDR
&& (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_DIMMED) == 0
&& (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_LOW_POWER)
&& (mBrightnessReasonTemp.getModifier() & BrightnessReason.MODIFIER_DIMMED) == 0
&& (mBrightnessReasonTemp.getModifier() & BrightnessReason.MODIFIER_LOW_POWER)
== 0) {
// We want to scale HDR brightness level with the SDR level
// We want to scale HDR brightness level with the SDR level, we also need to restore
// SDR brightness immediately when entering dim or low power mode.
animateValue = mHbmController.getHdrBrightnessValue();
}

View File

@@ -1456,10 +1456,11 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal
// TODO(b/216365040): The decision to prevent HBM for HDR in low power mode should be
// done in HighBrightnessModeController.
if (mHbmController.getHighBrightnessMode() == BrightnessInfo.HIGH_BRIGHTNESS_MODE_HDR
&& (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_DIMMED) == 0
&& (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_LOW_POWER)
&& (mBrightnessReasonTemp.getModifier() & BrightnessReason.MODIFIER_DIMMED) == 0
&& (mBrightnessReasonTemp.getModifier() & BrightnessReason.MODIFIER_LOW_POWER)
== 0) {
// We want to scale HDR brightness level with the SDR level
// We want to scale HDR brightness level with the SDR level, we also need to restore
// SDR brightness immediately when entering dim or low power mode.
animateValue = mHbmController.getHdrBrightnessValue();
}