ToneGenerator: fix sampling rate selection.

The ToneGenerator sampling rate is used to configure the wave generator
oscillators and must match the AudioTrack sampling rate.
Previous sampling rate initialization assumed that the sampling rate
retrieved by AudioSystem::getOutputSamplingRate at contruction time
would always match the AudioTrack sampling rate but it is not always the case.

Bug: 325575809
Flag: EXEMPT bug fix
Test: repro steps in bug
Change-Id: Ie2235c66f7f5f03f64e0afb66309d451f7a3a4e2
1 file changed