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

Commit 13df77c3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Restoring SDR brightness immediately when entering dim state if the...

Merge "Restoring SDR brightness immediately when entering dim state if the device is in HDR brightness scale mode."
parents 6b982465 214d612e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1670,9 +1670,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.modifier & BrightnessReason.MODIFIER_DIMMED) == 0
                    && (mBrightnessReason.modifier & BrightnessReason.MODIFIER_LOW_POWER) == 0) {
                // We want to scale HDR brightness level with the SDR level
                    && (mBrightnessReasonTemp.modifier & BrightnessReason.MODIFIER_DIMMED) == 0
                    && (mBrightnessReasonTemp.modifier & BrightnessReason.MODIFIER_LOW_POWER)
                    == 0) {
                // 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();
            }