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

Commit a8edffd8 authored by Soroosh Mariooryad's avatar Soroosh Mariooryad
Browse files

Fixing auto-brightness logs:

- Previously old values of were set after update of new, resulting in
losing the correct old values.

Test: manual

Change-Id: Ie94c89df7d6fcb19da3da10774810d2d17ba5270
parent d7e11954
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -32,8 +32,8 @@ import android.os.SystemClock;
import android.text.format.DateUtils;
import android.util.EventLog;
import android.util.MathUtils;
import android.util.Spline;
import android.util.Slog;
import android.util.Spline;
import android.util.TimeUtils;

import java.io.PrintWriter;
@@ -229,13 +229,13 @@ class AutomaticBrightnessController {
        // debugging purposes.
        mDozing = dozing;
        boolean changed = setLightSensorEnabled(enable && !dozing);
        if (enable && !dozing && userInitiatedChange) {
            prepareBrightnessAdjustmentSample();
        }
        changed |= setScreenAutoBrightnessAdjustment(adjustment);
        if (changed) {
            updateAutoBrightness(false /*sendUpdate*/);
        }
        if (enable && !dozing && userInitiatedChange) {
            prepareBrightnessAdjustmentSample();
        }
    }

    public void dump(PrintWriter pw) {