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

Commit e6a693ed 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

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

Change-Id: I6931a10fa9d9750b79f31af0512c420379d5f936
parents 7e0527c5 105a3209
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -440,9 +440,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,