sm6375-common: power-libperfmgr: Make HintManager a singleton class
HintManager is unique and widely used in many different components.
This is for making it easiler to be reloaded for debugging.
Bug: 172285365
Test: adb push \
out/target/product/raven/data/nativetest64/libperfmgr_test/libperfmgr_test \
/data/nativetest64/libperfmgr_test/libperfmgr_test && \
adb shell /data/nativetest64/libperfmgr_test/libperfmgr_test
Change-Id: I3affdfe780073ebbc50fac7bfbdd1530ee9dc8c2
This commit is contained in:
parent
c515a81911
commit
473d400819
9 changed files with 68 additions and 96 deletions
|
|
@ -30,18 +30,15 @@ namespace power {
|
|||
namespace impl {
|
||||
namespace pixel {
|
||||
|
||||
using ::android::perfmgr::HintManager;
|
||||
|
||||
class PowerExt : public ::aidl::google::hardware::power::extension::pixel::BnPowerExt {
|
||||
public:
|
||||
PowerExt(std::shared_ptr<HintManager> hm) : mHintManager(hm) {}
|
||||
PowerExt() {}
|
||||
ndk::ScopedAStatus setMode(const std::string &mode, bool enabled) override;
|
||||
ndk::ScopedAStatus isModeSupported(const std::string &mode, bool *_aidl_return) override;
|
||||
ndk::ScopedAStatus setBoost(const std::string &boost, int32_t durationMs) override;
|
||||
ndk::ScopedAStatus isBoostSupported(const std::string &boost, bool *_aidl_return) override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<HintManager> mHintManager;
|
||||
};
|
||||
|
||||
} // namespace pixel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue