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

Commit ced82308 authored by Joen Chen's avatar Joen Chen Committed by Android (Google) Code Review
Browse files

Merge "Set mBrightness when needsComposite is zero" into tm-qpr-dev

parents dae6b8eb 4292810f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -334,8 +334,10 @@ void DisplayDevice::stageBrightness(float brightness) {
}

void DisplayDevice::persistBrightness(bool needsComposite) {
    if (needsComposite && mStagedBrightness && mBrightness != *mStagedBrightness) {
    if (mStagedBrightness && mBrightness != *mStagedBrightness) {
        if (needsComposite) {
            getCompositionDisplay()->setNextBrightness(*mStagedBrightness);
        }
        mBrightness = *mStagedBrightness;
    }
    mStagedBrightness = std::nullopt;