Fix the volume of A2DP devices which switching audio

When switching audio between Hearing Aids and A2DP devices, the stored
volume may be incorrect due to a race condition with the audio service.
This CL will only stored the A2DP when switching away from A2DP and also
before the audio service starts its processing.

Bug: 123720932
Test: Manual test with switching between Hearing Aids and A2DP speaker
Change-Id: I634ab58f6103197e7a99301b1e9f4d28e55e35a5
2 files changed