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

Commit 1b2d13ac authored by Lais Andrade's avatar Lais Andrade
Browse files

Use Boost instead of PowerHint in surface composer

Change SurfaceComposerClient api to expect a Boost instead of PowerHint.

Bug: 150878220
Test: atest DisplayTransactionTest
Change-Id: Id4b89ec3836ed7cbe5429be5a0d3791204944e69
parent 9473bd3f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ static void setPowerBoostWithHandle(sp<IPowerAidl> handle, Boost boost, int32_t

    auto ret = handle->setBoost(boost, durationMs);
    processPowerHalReturn(ret.isOk(), "setPowerBoost");
    SurfaceComposerClient::notifyPowerBoost(static_cast<int32_t>(boost));
}

static void setPowerBoost(Boost boost, int32_t durationMs) {
@@ -268,6 +269,7 @@ static void sendPowerHint(PowerHint hintId, uint32_t data) {
                sp<IPowerAidl> handle = gPowerHalAidl_;
                lock.unlock();
                setPowerBoostWithHandle(handle, Boost::INTERACTION, data);
                SurfaceComposerClient::notifyPowerBoost(static_cast<int32_t>(Boost::INTERACTION));
                break;
            } else if (hintId == PowerHint::LAUNCH) {
                sp<IPowerAidl> handle = gPowerHalAidl_;
@@ -300,7 +302,6 @@ static void sendPowerHint(PowerHint hintId, uint32_t data) {
            return;
        }
    }
    SurfaceComposerClient::notifyPowerHint(static_cast<int32_t>(hintId));
}

void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType) {