diff options
author | Narayan Kamath <narayan@google.com> | 2013-10-15 05:05:01 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-15 05:05:01 -0700 |
commit | 3278eed31fcf82045ac00dcd549dda5270c88971 (patch) | |
tree | b5a5423ca7a4464afb8f4182dc22b72dcb7c1917 | |
parent | d5ce2091c7e11c4d869f11f22d8a38a1aedcf3ad (diff) | |
parent | 8580679e1780617d978d28a43e932314b86608ce (diff) | |
download | frameworks_av-3278eed31fcf82045ac00dcd549dda5270c88971.zip frameworks_av-3278eed31fcf82045ac00dcd549dda5270c88971.tar.gz frameworks_av-3278eed31fcf82045ac00dcd549dda5270c88971.tar.bz2 |
am 8580679e: am 014e7fa2: Make Audio wakelock names less unique.
* commit '8580679e1780617d978d28a43e932314b86608ce':
Make Audio wakelock names less unique.
-rw-r--r-- | services/audioflinger/Threads.cpp | 23 | ||||
-rw-r--r-- | services/audioflinger/Threads.h | 2 |
2 files changed, 23 insertions, 2 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 5e41dd2..6edb493 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -500,6 +500,25 @@ void AudioFlinger::ThreadBase::acquireWakeLock(int uid) acquireWakeLock_l(uid); } +String16 AudioFlinger::ThreadBase::getWakeLockTag() +{ + switch (mType) { + case MIXER: + return String16("AudioMix"); + case DIRECT: + return String16("AudioDirectOut"); + case DUPLICATING: + return String16("AudioDup"); + case RECORD: + return String16("AudioIn"); + case OFFLOAD: + return String16("AudioOffload"); + default: + ALOG_ASSERT(false); + return String16("AudioUnknown"); + } +} + void AudioFlinger::ThreadBase::acquireWakeLock_l(int uid) { if (mPowerManager == 0) { @@ -519,13 +538,13 @@ void AudioFlinger::ThreadBase::acquireWakeLock_l(int uid) if (uid >= 0) { status = mPowerManager->acquireWakeLockWithUid(POWERMANAGER_PARTIAL_WAKE_LOCK, binder, - String16(mName), + getWakeLockTag(), String16("media"), uid); } else { status = mPowerManager->acquireWakeLock(POWERMANAGER_PARTIAL_WAKE_LOCK, binder, - String16(mName), + getWakeLockTag(), String16("media")); } if (status == NO_ERROR) { diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index 906846f..6c01bb9 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -254,6 +254,8 @@ protected: // check if some effects must be suspended when an effect chain is added void checkSuspendOnAddEffectChain_l(const sp<EffectChain>& chain); + String16 getWakeLockTag(); + virtual void preExit() { } friend class AudioFlinger; // for mEffectChains |