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

Commit 225fef5e authored by Craig Mautner's avatar Craig Mautner Committed by Android Git Automerger
Browse files

am c3dfaf8d: am a13b4da6: Merge "Fix initial brightness state after startup." into jb-dev

* commit 'c3dfaf8d':
  Fix initial brightness state after startup.
parents 39150720 c3dfaf8d
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2242,8 +2242,10 @@ public class PowerManagerService extends IPowerManager.Stub
                    } else {
                        newValue = endValue;
                        mHighestLightSensorValue = endSensorValue;
                        if (endValue > 0) {
                            mInitialAnimation = false;
                        }
                    }

                    if (mDebugLightAnimation) {
                        Slog.v(TAG, "Animating light: " + "start:" + startValue
@@ -2290,7 +2292,7 @@ public class PowerManagerService extends IPowerManager.Stub
                currentMask = mask;
                duration = (int) (mWindowScaleAnimation * animationDuration);
                startTimeMillis = SystemClock.elapsedRealtime();
                mInitialAnimation = currentValue == 0 && target > 0;
                mInitialAnimation = mInitialAnimation && target > 0;

                if (mDebugLightAnimation) {
                    Slog.v(TAG, "animateTo(target=" + target
@@ -2608,7 +2610,8 @@ public class PowerManagerService extends IPowerManager.Stub
        }
    };

    private boolean mInitialAnimation; // used to prevent lightsensor changes while turning on
    /** used to prevent lightsensor changes while turning on. */
    private boolean mInitialAnimation = true;

    private void dockStateChanged(int state) {
        synchronized (mLocks) {