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

Commit b6258e09 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make brightness transition to ON immediate if the screen was OFF...

Merge "Make brightness transition to ON immediate if the screen was OFF because of close proxiity" into tm-qpr-dev am: e40c77a2

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



Change-Id: I9a9c931b97c10ec7fa5091be151eb2fc4f5f2918
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e2fa32a0 e40c77a2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1204,6 +1204,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
        }
        assert(state != Display.STATE_UNKNOWN);

        boolean skipRampBecauseOfProximityChangeToNegative = false;
        // Apply the proximity sensor.
        if (mProximitySensor != null) {
            if (mPowerRequest.useProximitySensor && state != Display.STATE_OFF) {
@@ -1241,6 +1242,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                // the screen back on.  Also turn it back on if we've been asked to ignore the
                // prox sensor temporarily.
                mScreenOffBecauseOfProximity = false;
                skipRampBecauseOfProximityChangeToNegative = true;
                sendOnProximityNegativeWithWakelock();
            }
        } else {
@@ -1523,8 +1525,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call

            final boolean wasOrWillBeInVr =
                    (state == Display.STATE_VR || oldState == Display.STATE_VR);
            final boolean initialRampSkip =
                    state == Display.STATE_ON && mSkipRampState != RAMP_STATE_SKIP_NONE;
            final boolean initialRampSkip = (state == Display.STATE_ON && mSkipRampState
                    != RAMP_STATE_SKIP_NONE) || skipRampBecauseOfProximityChangeToNegative;
            // While dozing, sometimes the brightness is split into buckets. Rather than animating
            // through the buckets, which is unlikely to be smooth in the first place, just jump
            // right to the suggested brightness.