Improve ownership model of AudioMixes in AudioPolicies
1) Only allow unregistration of mixes that belong to the policy
attempting to unregister the mixes.
2) Add a Binder token to AudioMix to uniquely identify mixes. This
ensures AudioMixes can only be unregistered by the caller that
registered them.
3) Only add AudioMixes to the Java-side policy representation if the
native registration succeeded.
4) Clear Java-side policy mixes after the policy is unregistered
completely.
Bug: 309080867
Test: atest AudioHostTest
Change-Id: I96f384a998a05d00317013da2d953f48a1c8144a
5 files changed