sm6375-common: power-libperfmgr: Fix objects that are derived from refbase

Fixes: ag/14313466
Bug: 177493042
Bug: 191163855
Test: Build
Change-Id: I94812997a8214b77a2e1d0bcf90ef62205c5adf6
Signed-off-by: Wei Wang <wvw@google.com>
This commit is contained in:
Wei Wang 2024-07-18 20:16:00 +05:30 committed by Anand S
commit 7bfee27a4b
No known key found for this signature in database
GPG key ID: 3B2983FA448B3D61
6 changed files with 20 additions and 20 deletions

View file

@ -53,8 +53,8 @@ class PowerSessionManager : public MessageHandler {
void setHintManager(std::shared_ptr<HintManager> const &hint_manager);
// Singleton
static PowerSessionManager &getInstance() {
static PowerSessionManager instance;
static sp<PowerSessionManager> getInstance() {
static sp<PowerSessionManager> instance = new PowerSessionManager();
return instance;
}
@ -80,17 +80,17 @@ class PowerHintMonitor : public Thread {
public:
void start();
bool threadLoop() override;
Looper *getLooper();
sp<Looper> getLooper();
// Singleton
static PowerHintMonitor &getInstance() {
static PowerHintMonitor instance;
static sp<PowerHintMonitor> getInstance() {
static sp<PowerHintMonitor> instance = new PowerHintMonitor();
return instance;
}
PowerHintMonitor(PowerHintMonitor const &) = delete;
void operator=(PowerHintMonitor const &) = delete;
private:
Looper *mLooper;
sp<Looper> mLooper;
// Singleton
PowerHintMonitor() : Thread(false), mLooper(new Looper(true)) {}
};