summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-10-04 11:46:55 -0700
committerEric Laurent <elaurent@google.com>2013-10-04 11:46:55 -0700
commit547789d25dc6bd6561553bcf6b384fb0d4fee834 (patch)
tree767ae4b24b4fc71cc547cfa16898f5299d26a6cc /services/audioflinger
parent7bab024867996bec6dc4e3e31ed4570da9afbc25 (diff)
downloadframeworks_av-547789d25dc6bd6561553bcf6b384fb0d4fee834.zip
frameworks_av-547789d25dc6bd6561553bcf6b384fb0d4fee834.tar.gz
frameworks_av-547789d25dc6bd6561553bcf6b384fb0d4fee834.tar.bz2
audioflinger: fix wake lock acquisition check
Commit e14a5d6 introduced a bug in ThreadBase::acquireWakeLock() where the wake lock acquisition return code is not initialized before being checked causing the wake lock token to be sometines not set and potential failure to release the wake lock later. Bug: 10985160. Change-Id: Iffd40e773ae3bcfec3c148a844d5dbebbf474eaf
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/Threads.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 8aae892..943a70e 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -499,13 +499,13 @@ void AudioFlinger::ThreadBase::acquireWakeLock_l(int uid)
sp<IBinder> binder = new BBinder();
status_t status;
if (uid >= 0) {
- mPowerManager->acquireWakeLockWithUid(POWERMANAGER_PARTIAL_WAKE_LOCK,
+ status = mPowerManager->acquireWakeLockWithUid(POWERMANAGER_PARTIAL_WAKE_LOCK,
binder,
String16(mName),
String16("media"),
uid);
} else {
- mPowerManager->acquireWakeLock(POWERMANAGER_PARTIAL_WAKE_LOCK,
+ status = mPowerManager->acquireWakeLock(POWERMANAGER_PARTIAL_WAKE_LOCK,
binder,
String16(mName),
String16("media"));