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

Commit ac68d0a2 authored by Michael Wright's avatar Michael Wright Committed by Automerger Merge Worker
Browse files

Merge "[Improvement]Fix loss of permissibleRatio calcaulation accuracy." am:...

Merge "[Improvement]Fix loss of permissibleRatio calcaulation accuracy." am: f9c69a2c am: 105a3209 am: e6a693ed

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

Change-Id: I237b063b45b16af6a476c1d8222a127c46eb7760
parents b50914c5 e6a693ed
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -433,9 +433,8 @@ public abstract class BrightnessMappingStrategy {
    }

    private float permissibleRatio(float currLux, float prevLux) {
        return MathUtils.exp(MAX_GRAD
                * (MathUtils.log(currLux + LUX_GRAD_SMOOTHING)
                    - MathUtils.log(prevLux + LUX_GRAD_SMOOTHING)));
        return MathUtils.pow((currLux + LUX_GRAD_SMOOTHING)
                / (prevLux + LUX_GRAD_SMOOTHING), MAX_GRAD);
    }

    protected float inferAutoBrightnessAdjustment(float maxGamma, float desiredBrightness,