Avoid storing 'this' in a wp<AudioEffect> while in constructor
Storing 'this' into wp<AudioEffect> while running the constructor of an AudioEffect can lead to premature instance destruction because the owner of this weak pointer may promote to sp<> on a thread running in parallel to the constructor. Fixed by removing a call to AudioEffect::set from the constructor and moving the responsibility for calling it to client code. Bug: 162012829 Bug: 162323621 Test: repro steps from the bug atest android.media.cts.VisualizerTest Change-Id: Ice5f510b1c9020b5ba73bd6223c1669ab8eae24c Merged-In: Ice5f510b1c9020b5ba73bd6223c1669ab8eae24c
Loading
Please register or sign in to comment