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

Commit 0085ce05 authored by Julius D'souza's avatar Julius D'souza Committed by android-build-merger
Browse files

DO NOT MERGE: Disable dim brightness reset when using ALS-based doze

am: 637ae798

Change-Id: I3c2045d253a75d9afcf8771a503188c47d8de49d
parents 2979f63c 637ae798
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -686,8 +686,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
        }

        // Apply dimming by at least some minimum amount when user activity
        // timeout is about to expire.
        if (mPowerRequest.policy == DisplayPowerRequest.POLICY_DIM) {
        // timeout is about to expire unless we're having an ALS-based doze brightness
        // in which case the brightness could increase, causing unwanted flashes.
        if (mPowerRequest.policy == DisplayPowerRequest.POLICY_DIM
                && !mAllowAutoBrightnessWhileDozingConfig) {
            if (brightness > mScreenBrightnessRangeMinimum) {
                brightness = Math.max(Math.min(brightness - SCREEN_DIM_MINIMUM_REDUCTION,
                        mScreenBrightnessDimConfig), mScreenBrightnessRangeMinimum);