audio service: simplify becoming noisy intent logic

Simplify and fix the logic deciding if AudioManager.ACTION_AUDIO_BECOMING_NOISY
intent should be broadcast when a device is disconnected.

Bug: 37308922
Test: verify music stops when disconnecting a wired or BT A2DP headset
  and it is the only device connected.
  Verify music doesn't stop when disconnecting a wired or BT A2DP headset
  and they are both connected.

Change-Id: Iba5885697d37a2f3d23dfc013623e2fbec173998
1 file changed