tracks: Check track states before transitioning states

Prevents sporadic crashes when the user plugs/unplugs the headset
rapidly. These were caused by performing track operations such as start,
stop and record before checking whether the tracks had been stopped
before.

Change-Id: I54b5ba102ffbed4c453ee5f15533467e5f4771fd
Ticket: CYNGNOS-2775
1 file changed
tree: 8d58eca12a3a87b54e3815e130d06c424d4efabb
  1. jni/
  2. res/
  3. src/
  4. Android.mk
  5. AndroidManifest.xml