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

Commit 18e177e4 authored by Piotr Wilczyński's avatar Piotr Wilczyński Committed by Automerger Merge Worker
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." into udc-dev am: 2fecd503 am: 7dc59348

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22224323



Change-Id: I290617b4ac7e2d96ea61965a2a82cdac1132133e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b200e3e4 7dc59348
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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();
            }

+4 −3
Original line number Diff line number Diff line
@@ -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();
            }