Merge "libpower: pass static-duration strong pointer as const reference." am: 18ad7b2cba
am: 18684e0815
Change-Id: I726359fd0a1fd3cf9e00676460a0e267807f3a5e
This commit is contained in:
commit
755c3eb98e
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