commit | 8ea16e4b0a7d398d26887c18675b3899de5d779d | [log] [tgz] |
---|---|---|
author | Eric Laurent <elaurent@google.com> | Thu Feb 20 16:26:11 2014 -0800 |
committer | Eric Laurent <elaurent@google.com> | Thu Feb 20 16:26:11 2014 -0800 |
tree | 7bb7efa2106401a375cfe8874b6f4bb03dfdfb28 | |
parent | 56df9ff31d583ad3eae4f279a3df550273c58e1e [diff] |
audioflinger: fix race condition in SyncEvent callback Now that the SyncEvent callback is implemented by the RecordTrack instead of the RecordThread, there is a possibility that the callback is called after the track deletion. SyncEvent callback now uses a weak pointer instead of a raw pointer as cookie. This allows the callback implementer to acquire a strong reference on the object pointed to by the cookie. Bug: 13114128. Change-Id: Id61b8f06044ed1e52c6f7e7c666cdede68340de2