fm: Cleanup threads on FM close

On FM close, we don't wait for tx and rx threads to complete and
returns. If we turns on FM again and threads terminated during that
interval causes ANR as we destroy mutex during thread tremination
and on FM ON we try to acquire the destroyed mutex.
On FM close, wait for threads to be terminated and do the cleanup.

Change-Id: I5febb78be268488714a59049f0cede0020d814b5
1 file changed
tree: 8ad39ac2c26c55491d52fc956239234a49e2f401
  1. fm_hci/
  2. fmapp/
  3. fmapp2/
  4. FMRecord/
  5. helium/
  6. jni/
  7. libfm_jni/
  8. qcom/
  9. Android.mk