Fix issue 4111672: AudioTrack control block flags

Make sure that all read/modify/write operations on the AudioTrack
and AudioRecord control block flags field are protected by the
control block's mutex.

Also fix potential infinite loop in AudioTrack::write() if the
written size is not a multiple of frame size.

Change-Id: Ib3d557eb45dcc3abeb32c9aa56058e2873afee27
3 files changed
tree: 03aad0239e15dbb12e56c29f4d886e72e111ee2f
  1. camera/
  2. cmds/
  3. drm/
  4. include/
  5. media/
  6. services/