SyncEvent: modernize C++

And add unit test mediasyncevent_tests.

Test: atest mediasyncevent_tests
Bug: 283021652
Merged-In: I37711f4271c68042f178db9370549c0c3260ace8
Change-Id: I37711f4271c68042f178db9370549c0c3260ace8
diff --git a/services/audioflinger/TrackBase.h b/services/audioflinger/TrackBase.h
index db056d2..6c42dc8 100644
--- a/services/audioflinger/TrackBase.h
+++ b/services/audioflinger/TrackBase.h
@@ -84,7 +84,7 @@
             pid_t       creatorPid() const { return mCreatorPid; }
 
             audio_port_handle_t portId() const { return mPortId; }
-    virtual status_t    setSyncEvent(const sp<SyncEvent>& event);
+    virtual status_t    setSyncEvent(const sp<audioflinger::SyncEvent>& event);
 
             sp<IMemory> getBuffers() const { return mBufferMemory; }
             void*       buffer() const { return mBuffer; }
@@ -374,7 +374,7 @@
 
     const audio_session_t mSessionId;
     uid_t               mUid;
-    Vector < sp<SyncEvent> >mSyncEvents;
+    std::list<sp<audioflinger::SyncEvent>> mSyncEvents;
     const bool          mIsOut;
     sp<ServerProxy>     mServerProxy;
     const int           mId;