use sp<AudioEffect> instead of unique_ptr<AudioEffect>

As a child class of RefBase, an AudioEffect object should be held by sp<> rather than by unique_ptr<>.

If you use unique_ptr<> to hold it, then later, someone else, on the other hand, may probably use sp<> to hold it, then in the future, the AudioEffect object may be deleted two times: one is from sp<>, the other from unique_ptr<>.

This may be detected by the destructor of class RefBase, with the log complaint "RefBase: Explicit destruction,..."

Test: monkey test for one day and one night

Signed-off-by: Jintao Zhu <zhujtcsieee@gmail.com>
Change-Id: I52e1df86899dfd8265aa80b4d3423936f66fcd47
diff --git a/services/audiopolicy/service/AudioPolicyEffects.h b/services/audiopolicy/service/AudioPolicyEffects.h
index 81c728d..13d5d0c 100644
--- a/services/audiopolicy/service/AudioPolicyEffects.h
+++ b/services/audiopolicy/service/AudioPolicyEffects.h
@@ -207,7 +207,7 @@
             mDeviceType(device), mDeviceAddress(address) {}
         /*virtual*/ ~DeviceEffects() = default;
 
-        std::vector<std::unique_ptr<AudioEffect>> mEffects;
+        std::vector< sp<AudioEffect> > mEffects;
         audio_devices_t getDeviceType() const { return mDeviceType; }
         std::string getDeviceAddress() const { return mDeviceAddress; }
         const std::unique_ptr<EffectDescVector> mEffectDescriptors;