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:
parent
d01fb0826f
commit
7bfee27a4b
6 changed files with 20 additions and 20 deletions
|
|
@ -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)) {}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue