summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-01-09 10:24:09 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-09 10:24:09 -0800
commitf5c491651fe7575e1b05e924b0d5326481c1678b (patch)
tree298bd9dd1022532c3025d4dcc39de114e8ba4d4d /services
parent08289f55eae5c4127091360e862f78d57ae24c15 (diff)
parent1dce841996993403899b5d54a5a7ae7c3be040a0 (diff)
downloadframeworks_base-f5c491651fe7575e1b05e924b0d5326481c1678b.zip
frameworks_base-f5c491651fe7575e1b05e924b0d5326481c1678b.tar.gz
frameworks_base-f5c491651fe7575e1b05e924b0d5326481c1678b.tar.bz2
Merge "suspended() and isSuspended() are const"
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp3
-rw-r--r--services/audioflinger/AudioFlinger.h6
2 files changed, 5 insertions, 4 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 2b3c442..cc65651 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -6708,7 +6708,8 @@ void AudioFlinger::EffectModule::setSuspended(bool suspended)
Mutex::Autolock _l(mLock);
mSuspended = suspended;
}
-bool AudioFlinger::EffectModule::suspended()
+
+bool AudioFlinger::EffectModule::suspended() const
{
Mutex::Autolock _l(mLock);
return mSuspended;
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 7baa8fc..cf8d495 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -730,7 +730,7 @@ private:
void suspend() { mSuspended++; }
void restore() { if (mSuspended) mSuspended--; }
- bool isSuspended() { return (mSuspended != 0); }
+ bool isSuspended() const { return (mSuspended != 0); }
virtual String8 getParameters(const String8& keys);
virtual void audioConfigChanged_l(int event, int param = 0);
virtual status_t getRenderPosition(uint32_t *halFrames, uint32_t *dspFrames);
@@ -1115,7 +1115,7 @@ private:
status_t start();
status_t stop();
void setSuspended(bool suspended);
- bool suspended();
+ bool suspended() const;
sp<EffectHandle> controlHandle();
@@ -1138,7 +1138,7 @@ private:
status_t start_l();
status_t stop_l();
- Mutex mLock; // mutex for process, commands and handles list protection
+mutable Mutex mLock; // mutex for process, commands and handles list protection
wp<ThreadBase> mThread; // parent thread
wp<EffectChain> mChain; // parent effect chain
int mId; // this instance unique ID