commit | 95bd2329c6a36211f18be3e089eaa775ec62df62 | [log] [tgz] |
---|---|---|
author | Glenn Kasten <gkasten@google.com> | Wed Nov 28 07:39:25 2012 -0800 |
committer | Glenn Kasten <gkasten@google.com> | Thu Nov 29 14:40:23 2012 -0800 |
tree | 66e3c484be51c49555c66b33bbd30eccf61b01a2 | |
parent | 3251d363139cbda760af27755f5685a14afe6655 [diff] |
Simplify AudioTrack event handling and fix a race Fixed race where mEventHandlerDelegate was accessed multiple times with an assumption that all values read were the same. If setPlaybackPositionUpdateListener was called with a null listener, it did not update the delegate. Inner classes can access final local variables of the enclosing method. Use this to remove fields mPositionListener, mPositionListenerLock, mListener. Change-Id: Ibf5cae61a1a9d21b745b90d4b74f9be14b66e37b