audiopolicy: Check open outputs count before closing.

- In compress offload session subsystem restart triggers
  invalidaton. For direct or compress session NuPlayer
  is notified as track cant be restored and it restarts
  session with direct attributes which fails again as sound
  card is offline and output descriptor is closed on this
  failed attempt. While closing the output descriptor its
  open count is checked and if its less than 1 its logged
  as fatal.

- Fix is to avoid closing of output descriptor if its
  not opened successfully.

Change-Id: I0456edcbdea483a5620a33aca5d4da2b93b04589
1 file changed
tree: 205c9176c97feaa0022ebd1beb1496e769424928
  1. policy_hal/
  2. Android.mk