Merge "libpower: pass static-duration strong pointer as const reference."
am: 18ad7b2cba
Change-Id: I592535b4c8956ea5bbb6135907d56d669a16a761
This commit is contained in:
commit
18684e0815
1 changed files with 2 additions and 2 deletions
|
@ -35,14 +35,14 @@ using android::system::suspend::V1_0::WakeLockType;
|
|||
static std::mutex gLock;
|
||||
static std::unordered_map<std::string, sp<IWakeLock>> gWakeLockMap;
|
||||
|
||||
static sp<ISystemSuspend> getSystemSuspendServiceOnce() {
|
||||
static const sp<ISystemSuspend>& getSystemSuspendServiceOnce() {
|
||||
static sp<ISystemSuspend> suspendService = ISystemSuspend::getService();
|
||||
return suspendService;
|
||||
}
|
||||
|
||||
int acquire_wake_lock(int, const char* id) {
|
||||
ATRACE_CALL();
|
||||
sp<ISystemSuspend> suspendService = getSystemSuspendServiceOnce();
|
||||
const auto& suspendService = getSystemSuspendServiceOnce();
|
||||
if (!suspendService) {
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue