Fixed issue with enabling/disabling routing callback

Added fix for issue where enabling/disabling native routing callback for
AudioTrack and MediaPlayer when playback state switching in between
starting and enabling routing callback, or in between stopping and
disabling device callback.

Bug: 176043355
Test: atest android.media.cts.AudioPlaybackConfigurationTest
Test: Verify illegal state error was not present anymore
Change-Id: Iefedf7daab0de2250772ee17d23916b4ee6903f2
2 files changed