summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-02-10 15:30:15 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-10 15:30:15 -0800
commit858df80948ee64f478782a6a6c06533ba1651ef1 (patch)
treed5b854a26e507ab8ce03037371146e5a34937151 /services
parent95a87908ddf240760e8e8b35a6cafcc149c7f33f (diff)
parent58123c3a8b5f34f9d1f70264a3c568ed90288501 (diff)
downloadframeworks_av-858df80948ee64f478782a6a6c06533ba1651ef1.zip
frameworks_av-858df80948ee64f478782a6a6c06533ba1651ef1.tar.gz
frameworks_av-858df80948ee64f478782a6a6c06533ba1651ef1.tar.bz2
Merge "Camel case readability & private disconnect(bool)"
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp14
-rw-r--r--services/audioflinger/AudioFlinger.h8
2 files changed, 12 insertions, 10 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index f033dd5..285f7a1 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -5861,13 +5861,13 @@ void AudioFlinger::ThreadBase::setMode(audio_mode_t mode)
void AudioFlinger::ThreadBase::disconnectEffect(const sp<EffectModule>& effect,
const wp<EffectHandle>& handle,
- bool unpiniflast) {
+ bool unpinIfLast) {
Mutex::Autolock _l(mLock);
ALOGV("disconnectEffect() %p effect %p", this, effect.get());
// delete the effect module if removing last handle on it
if (effect->removeHandle(handle) == 0) {
- if (!effect->isPinned() || unpiniflast) {
+ if (!effect->isPinned() || unpinIfLast) {
removeEffect_l(effect);
AudioSystem::unregisterEffect(effect->id());
}
@@ -6183,7 +6183,7 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::EffectModule::controlHandle()
return mHandles.size() != 0 ? mHandles[0].promote() : 0;
}
-void AudioFlinger::EffectModule::disconnect(const wp<EffectHandle>& handle, bool unpiniflast)
+void AudioFlinger::EffectModule::disconnect(const wp<EffectHandle>& handle, bool unpinIfLast)
{
ALOGV("disconnect() %p handle %p", this, handle.unsafe_get());
// keep a strong reference on this EffectModule to avoid calling the
@@ -6192,7 +6192,7 @@ void AudioFlinger::EffectModule::disconnect(const wp<EffectHandle>& handle, bool
{
sp<ThreadBase> thread = mThread.promote();
if (thread != 0) {
- thread->disconnectEffect(keep, handle, unpiniflast);
+ thread->disconnectEffect(keep, handle, unpinIfLast);
}
}
}
@@ -6864,13 +6864,13 @@ void AudioFlinger::EffectHandle::disconnect()
disconnect(true);
}
-void AudioFlinger::EffectHandle::disconnect(bool unpiniflast)
+void AudioFlinger::EffectHandle::disconnect(bool unpinIfLast)
{
- ALOGV("disconnect(%s)", unpiniflast ? "true" : "false");
+ ALOGV("disconnect(%s)", unpinIfLast ? "true" : "false");
if (mEffect == 0) {
return;
}
- mEffect->disconnect(this, unpiniflast);
+ mEffect->disconnect(this, unpinIfLast);
if (mHasControl && mEnabled) {
sp<ThreadBase> thread = mEffect->thread().promote();
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 955648f..170709d 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -442,7 +442,7 @@ private:
status_t *status);
void disconnectEffect(const sp< EffectModule>& effect,
const wp<EffectHandle>& handle,
- bool unpiniflast);
+ bool unpinIfLast);
// return values for hasAudioSession (bit field)
enum effect_state {
@@ -1120,7 +1120,7 @@ private:
const wp<ThreadBase>& thread() { return mThread; }
status_t addHandle(const sp<EffectHandle>& handle);
- void disconnect(const wp<EffectHandle>& handle, bool unpiniflast);
+ void disconnect(const wp<EffectHandle>& handle, bool unpinIfLast);
size_t removeHandle (const wp<EffectHandle>& handle);
effect_descriptor_t& desc() { return mDescriptor; }
@@ -1196,7 +1196,9 @@ mutable Mutex mLock; // mutex for process, commands and handl
uint32_t *replySize,
void *pReplyData);
virtual void disconnect();
- virtual void disconnect(bool unpiniflast);
+ private:
+ void disconnect(bool unpinIfLast);
+ public:
virtual sp<IMemory> getCblk() const { return mCblkMemory; }
virtual status_t onTransact(uint32_t code, const Parcel& data,
Parcel* reply, uint32_t flags);