sm6375-common: power-libperfmgr: allow powerhint calls as soon as service starts

Bug: 147840817
Test: boot
Change-Id: Ic1d6e04109683b999bb99484930e95dc9813fc59
This commit is contained in:
Wei Wang 2024-07-18 12:56:42 +05:30 committed by Anand S
commit 0d151b245f
No known key found for this signature in database
GPG key ID: 3B2983FA448B3D61
5 changed files with 23 additions and 53 deletions

View file

@ -37,26 +37,18 @@ using ::android::perfmgr::HintManager;
class Power : public BnPower {
public:
Power(std::shared_ptr<HintManager> hm)
: mHintManager(hm),
mInteractionHandler(nullptr),
mVRModeOn(false),
mSustainedPerfModeOn(false),
mReady(false) {}
Power(std::shared_ptr<HintManager> hm);
ndk::ScopedAStatus setMode(Mode type, bool enabled) override;
ndk::ScopedAStatus isModeSupported(Mode type, bool *_aidl_return) override;
ndk::ScopedAStatus setBoost(Boost type, int32_t durationMs) override;
ndk::ScopedAStatus isBoostSupported(Boost type, bool *_aidl_return) override;
binder_status_t dump(int fd, const char **args, uint32_t numArgs) override;
void setReady();
private:
std::shared_ptr<HintManager> mHintManager;
std::unique_ptr<InteractionHandler> mInteractionHandler;
std::atomic<bool> mVRModeOn;
std::atomic<bool> mSustainedPerfModeOn;
std::atomic<bool> mReady;
};
} // namespace pixel