Fix the condition for HDR brightness

Bug: 240248477
Test: Flash the CL, make sure it doesn't break anything
Change-Id: I49e3adda3cfd4b793f0eeb3b1da544c581d8c8ec
This commit is contained in:
Piotr Wilczyński
2022-09-23 15:08:42 +00:00
parent 9be01f68d8
commit b13b9ad623
2 changed files with 6 additions and 6 deletions

View File

@@ -1598,9 +1598,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// TODO(b/216365040): The decision to prevent HBM for HDR in low power mode should be // TODO(b/216365040): The decision to prevent HBM for HDR in low power mode should be
// done in HighBrightnessModeController. // done in HighBrightnessModeController.
if (mHbmController.getHighBrightnessMode() == BrightnessInfo.HIGH_BRIGHTNESS_MODE_HDR if (mHbmController.getHighBrightnessMode() == BrightnessInfo.HIGH_BRIGHTNESS_MODE_HDR
&& ((mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_DIMMED) == 0 && (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_DIMMED) == 0
|| (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_LOW_POWER) && (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_LOW_POWER)
== 0)) { == 0) {
// We want to scale HDR brightness level with the SDR level // We want to scale HDR brightness level with the SDR level
animateValue = mHbmController.getHdrBrightnessValue(); animateValue = mHbmController.getHdrBrightnessValue();
} }

View File

@@ -1598,9 +1598,9 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal
// TODO(b/216365040): The decision to prevent HBM for HDR in low power mode should be // TODO(b/216365040): The decision to prevent HBM for HDR in low power mode should be
// done in HighBrightnessModeController. // done in HighBrightnessModeController.
if (mHbmController.getHighBrightnessMode() == BrightnessInfo.HIGH_BRIGHTNESS_MODE_HDR if (mHbmController.getHighBrightnessMode() == BrightnessInfo.HIGH_BRIGHTNESS_MODE_HDR
&& ((mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_DIMMED) == 0 && (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_DIMMED) == 0
|| (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_LOW_POWER) && (mBrightnessReason.getModifier() & BrightnessReason.MODIFIER_LOW_POWER)
== 0)) { == 0) {
// We want to scale HDR brightness level with the SDR level // We want to scale HDR brightness level with the SDR level
animateValue = mHbmController.getHdrBrightnessValue(); animateValue = mHbmController.getHdrBrightnessValue();
} }