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

Commit d3b96596 authored by Piotr Wilczyński's avatar Piotr Wilczyński
Browse files

Fix brightness modifier HDR

Bug: 300292620
Test: adb logcat | grep -i "reason changing to"
Change-Id: I0d9c1d99a957563a88f423d21db4a3358d21556b
parent f8e61cf3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1914,6 +1914,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                // 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 = mBrightnessRangeController.getHdrBrightnessValue();
                mBrightnessReasonTemp.addModifier(BrightnessReason.MODIFIER_HDR);
            }

            final float currentBrightness = mPowerState.getScreenBrightness();
+1 −0
Original line number Diff line number Diff line
@@ -1516,6 +1516,7 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal
                // SDR brightness immediately when entering dim or low power mode.
                animateValue = mBrightnessRangeController.getHdrBrightnessValue();
                customTransitionRate = mBrightnessRangeController.getHdrTransitionRate();
                mBrightnessReasonTemp.addModifier(BrightnessReason.MODIFIER_HDR);
            }

            final float currentBrightness = mPowerState.getScreenBrightness();