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

Commit a4c988a1 authored by Matt Buckley's avatar Matt Buckley Committed by Android Build Coastguard Worker
Browse files

Fix PerformanceHints budget calculation

Bug: 382055833
Test: atest PerformanceHintNativeTestCases
Flag: EXEMPT ndk
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d43b2ffb563dac59fccfced17826ac84e66f03e7)
Merged-In: Icfeec0f6c5f32608054f623e53437b9d79e5bd6a
Change-Id: Icfeec0f6c5f32608054f623e53437b9d79e5bd6a
parent c18f6caa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ APerformanceHintManager* APerformanceHintManager::create(std::shared_ptr<IHintMa

bool APerformanceHintManager::canSendLoadHints(std::vector<hal::SessionHint>& hints, int64_t now) {
    mHintBudget =
            std::max(kMaxLoadHintsPerInterval,
            std::min(kMaxLoadHintsPerInterval,
                     mHintBudget +
                             static_cast<double>(now - mLastBudgetReplenish) * kReplenishRate);
    mLastBudgetReplenish = now;