audioflinger: Make use of android-base/macros.h
Replace local definitions of "array size" macro, and
declarations of non-copyable objects with corresponding
constructs from android-base/macros.h.
Also change "protected:" to "private:" for classes
not designed to be inherited.
Change-Id: I2d1e6d153511ed84d52fe6377879f83258890653
Test: make
diff --git a/services/audioflinger/Effects.h b/services/audioflinger/Effects.h
index 0755c52..e37529e 100644
--- a/services/audioflinger/Effects.h
+++ b/services/audioflinger/Effects.h
@@ -135,15 +135,14 @@
void dump(int fd, const Vector<String16>& args);
-protected:
+private:
friend class AudioFlinger; // for mHandles
bool mPinned;
// Maximum time allocated to effect engines to complete the turn off sequence
static const uint32_t MAX_DISABLE_TIME_MS = 10000;
- EffectModule(const EffectModule&);
- EffectModule& operator = (const EffectModule&);
+ DISALLOW_COPY_AND_ASSIGN(EffectModule);
status_t start_l();
status_t stop_l();
@@ -232,10 +231,9 @@
void dumpToBuffer(char* buffer, size_t size);
-protected:
+private:
friend class AudioFlinger; // for mEffect, mHasControl, mEnabled
- EffectHandle(const EffectHandle&);
- EffectHandle& operator =(const EffectHandle&);
+ DISALLOW_COPY_AND_ASSIGN(EffectHandle);
Mutex mLock; // protects IEffect method calls
wp<EffectModule> mEffect; // pointer to controlled EffectModule
@@ -366,10 +364,9 @@
void dump(int fd, const Vector<String16>& args);
-protected:
+private:
friend class AudioFlinger; // for mThread, mEffects
- EffectChain(const EffectChain&);
- EffectChain& operator =(const EffectChain&);
+ DISALLOW_COPY_AND_ASSIGN(EffectChain);
class SuspendedEffectDesc : public RefBase {
public: